diff options
| author | ptitSeb <seebastien.chev@gmail.com> | 2023-09-30 20:23:37 +0200 |
|---|---|---|
| committer | ptitSeb <seebastien.chev@gmail.com> | 2023-09-30 20:23:37 +0200 |
| commit | a724725fdf31c6308934b57f8ce8b442d0b1f5d3 (patch) | |
| tree | 85f60705d53f2242a53f2b42227863b33a194554 /src/include/debug.h | |
| parent | 84a5929645099e6d823b0395f00e63a0e2f6b38c (diff) | |
| download | box64-a724725fdf31c6308934b57f8ce8b442d0b1f5d3.tar.gz box64-a724725fdf31c6308934b57f8ce8b442d0b1f5d3.zip | |
[ANDROID] No mallochack on Android
Diffstat (limited to 'src/include/debug.h')
| -rw-r--r-- | src/include/debug.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/include/debug.h b/src/include/debug.h index acd842c2..5ff9e194 100644 --- a/src/include/debug.h +++ b/src/include/debug.h @@ -114,12 +114,11 @@ void printf_ftrace(const char* fmt, ...); void init_malloc_hook(void); #ifdef ANDROID -extern size_t(*box_malloc_usable_size)(const void*); -extern void*(*__libc_malloc)(size_t); -extern void*(*__libc_realloc)(void*, size_t); -extern void*(*__libc_calloc)(size_t, size_t); -extern void (*__libc_free)(void*); -extern void*(*__libc_memalign)(size_t, size_t); +#define box_malloc malloc +#define box_realloc realloc +#define box_calloc calloc +#define box_free free +#define box_memalign memalign #else extern size_t(*box_malloc_usable_size)(void*); extern void* __libc_malloc(size_t); @@ -127,12 +126,12 @@ extern void* __libc_realloc(void*, size_t); extern void* __libc_calloc(size_t, size_t); extern void __libc_free(void*); extern void* __libc_memalign(size_t, size_t); -#endif #define box_malloc __libc_malloc #define box_realloc __libc_realloc #define box_calloc __libc_calloc #define box_free __libc_free #define box_memalign __libc_memalign +#endif extern char* box_strdup(const char* s); extern char* box_realpath(const char* path, char* ret); |