File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 3434#include <time.h>
3535#if defined(__APPLE__ )
3636#include <malloc/malloc.h>
37- #elif defined(__linux__ )
37+ #elif defined(__linux__ ) || defined( __GLIBC__ )
3838#include <malloc.h>
3939#elif defined(__FreeBSD__ )
4040#include <malloc_np.h>
@@ -151,7 +151,7 @@ static size_t js_trace_malloc_usable_size(const void *ptr)
151151 return _msize ((void * )ptr );
152152#elif defined(EMSCRIPTEN )
153153 return 0 ;
154- #elif defined(__linux__ )
154+ #elif defined(__linux__ ) || defined( __GLIBC__ )
155155 return malloc_usable_size ((void * )ptr );
156156#else
157157 /* change this to `return 0;` if compilation fails */
Original file line number Diff line number Diff line change 3434#include <math.h>
3535#if defined(__APPLE__)
3636#include <malloc/malloc.h>
37- #elif defined(__linux__)
37+ #elif defined(__linux__) || defined(__GLIBC__)
3838#include <malloc.h>
3939#elif defined(__FreeBSD__)
4040#include <malloc_np.h>
@@ -1708,7 +1708,7 @@ static size_t js_def_malloc_usable_size(const void *ptr)
17081708 return _msize((void *)ptr);
17091709#elif defined(EMSCRIPTEN)
17101710 return 0;
1711- #elif defined(__linux__)
1711+ #elif defined(__linux__) || defined(__GLIBC__)
17121712 return malloc_usable_size((void *)ptr);
17131713#else
17141714 /* change this to `return 0;` if compilation fails */
You can’t perform that action at this time.
0 commit comments