android: Additional malloc_usable_size() fixes
This commit is contained in:
parent
ca176d4e8b
commit
229b07b9b2
2 changed files with 4 additions and 0 deletions
2
cutils.h
2
cutils.h
|
@ -40,6 +40,8 @@
|
||||||
#endif
|
#endif
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
#include <malloc/malloc.h>
|
#include <malloc/malloc.h>
|
||||||
|
#elif defined(__ANDROID__)
|
||||||
|
#include <dlmalloc.h>
|
||||||
#elif defined(__linux__) || defined(__CYGWIN__)
|
#elif defined(__linux__) || defined(__CYGWIN__)
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__)
|
||||||
|
|
|
@ -1726,6 +1726,8 @@ static const JSMallocFunctions def_malloc_funcs = {
|
||||||
malloc_size,
|
malloc_size,
|
||||||
#elif defined(_WIN32)
|
#elif defined(_WIN32)
|
||||||
(size_t (*)(const void *))_msize,
|
(size_t (*)(const void *))_msize,
|
||||||
|
#elif defined(__ANDROID__)
|
||||||
|
(size_t (*)(const void *))dlmalloc_usable_size,
|
||||||
#elif defined(__linux__) || defined (__CYGWIN__)
|
#elif defined(__linux__) || defined (__CYGWIN__)
|
||||||
(size_t (*)(const void *))malloc_usable_size,
|
(size_t (*)(const void *))malloc_usable_size,
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue