Skip to content

Commit

Permalink
android: Additional malloc_usable_size() fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
RobLoach authored and saghul committed Jan 31, 2024
1 parent ca176d4 commit 229b07b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down
2 changes: 2 additions & 0 deletions quickjs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 229b07b

Please sign in to comment.