android: Additional malloc_usable_size() fixes

This commit is contained in:
Rob Loach 2024-01-30 16:46:28 -05:00 committed by Saúl Ibarra Corretgé
parent ca176d4e8b
commit 229b07b9b2
2 changed files with 4 additions and 0 deletions

View file

@ -40,6 +40,8 @@
#endif
#if defined(__APPLE__)
#include <malloc/malloc.h>
#elif defined(__ANDROID__)
#include <dlmalloc.h>
#elif defined(__linux__) || defined(__CYGWIN__)
#include <malloc.h>
#elif defined(__FreeBSD__)

View file

@ -1726,6 +1726,8 @@ static const JSMallocFunctions def_malloc_funcs = {
malloc_size,
#elif defined(_WIN32)
(size_t (*)(const void *))_msize,
#elif defined(__ANDROID__)
(size_t (*)(const void *))dlmalloc_usable_size,
#elif defined(__linux__) || defined (__CYGWIN__)
(size_t (*)(const void *))malloc_usable_size,
#else