diff --git a/ndk_musl_include/malloc.h b/ndk_musl_include/malloc.h index 003d9197172b50454d91d1381b1e90cddbecd0d3..69ed79556ab639b80385a0c7ad4e0c19de61d973 100644 --- a/ndk_musl_include/malloc.h +++ b/ndk_musl_include/malloc.h @@ -19,6 +19,12 @@ extern "C" { #define M_DELAYED_FREE_ENABLE 1 #define M_DELAYED_FREE_DISABLE 0 +#define M_OHOS_CONFIG -1004 +#define M_DISABLE_OPT_TCACHE 100 +#define M_ENABLE_OPT_TCACHE 101 +#define M_TCACHE_PERFORMANCE_MODE 102 +#define M_TCACHE_NORMAL_MODE 103 + void *malloc (size_t); void *calloc (size_t, size_t); void *realloc (void *, size_t); diff --git a/porting/linux/user/include/malloc.h b/porting/linux/user/include/malloc.h index d34918851ce78d32a1d1b1d9a50b457c493b4541..29e7a22fdffe9cf7f993bf3c5b7665130ca75c88 100644 --- a/porting/linux/user/include/malloc.h +++ b/porting/linux/user/include/malloc.h @@ -60,6 +60,12 @@ void malloc_stats_print(void (*write_cb) (void *, const char *), void *cbopaque, #define M_DELAYED_FREE_ENABLE 1 #define M_DELAYED_FREE_DISABLE 0 +#define M_OHOS_CONFIG -1004 +#define M_DISABLE_OPT_TCACHE 100 +#define M_ENABLE_OPT_TCACHE 101 +#define M_TCACHE_PERFORMANCE_MODE 102 +#define M_TCACHE_NORMAL_MODE 103 + int mallopt(int param, int value); ssize_t malloc_backtrace(void* pointer, uintptr_t* frames, size_t frame_count);