mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-05 23:19:31 +03:00
Android build fix proposal.
malloc_usable_size has different signature on this platform. thread and real time apis are part of bionic.
This commit is contained in:
parent
69a0846478
commit
6c5039bad1
2 changed files with 10 additions and 4 deletions
|
@ -146,12 +146,14 @@ endif()
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
list(APPEND mi_libraries psapi shell32 user32 bcrypt)
|
list(APPEND mi_libraries psapi shell32 user32 bcrypt)
|
||||||
else()
|
else()
|
||||||
|
if(NOT ${CC} MATCHES "android")
|
||||||
list(APPEND mi_libraries pthread)
|
list(APPEND mi_libraries pthread)
|
||||||
find_library(LIBRT rt)
|
find_library(LIBRT rt)
|
||||||
if(LIBRT)
|
if(LIBRT)
|
||||||
list(APPEND mi_libraries ${LIBRT})
|
list(APPEND mi_libraries ${LIBRT})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Install and output names
|
# Install and output names
|
||||||
|
|
|
@ -165,7 +165,11 @@ extern "C" {
|
||||||
|
|
||||||
void* reallocf(void* p, size_t newsize) MI_FORWARD2(mi_reallocf,p,newsize);
|
void* reallocf(void* p, size_t newsize) MI_FORWARD2(mi_reallocf,p,newsize);
|
||||||
size_t malloc_size(void* p) MI_FORWARD1(mi_usable_size,p);
|
size_t malloc_size(void* p) MI_FORWARD1(mi_usable_size,p);
|
||||||
|
#if !defined(__ANDROID__)
|
||||||
size_t malloc_usable_size(void *p) MI_FORWARD1(mi_usable_size,p);
|
size_t malloc_usable_size(void *p) MI_FORWARD1(mi_usable_size,p);
|
||||||
|
#else
|
||||||
|
size_t malloc_usable_size(const void *p) MI_FORWARD1(mi_usable_size,p);
|
||||||
|
#endif
|
||||||
void cfree(void* p) MI_FORWARD0(mi_free, p);
|
void cfree(void* p) MI_FORWARD0(mi_free, p);
|
||||||
|
|
||||||
// no forwarding here due to aliasing/name mangling issues
|
// no forwarding here due to aliasing/name mangling issues
|
||||||
|
|
Loading…
Add table
Reference in a new issue