use prefix for extended mallinfo functions
parent
fb9f5d630b
commit
a28da3c65a
|
@ -1808,12 +1808,12 @@ COLD EXPORT int h_malloc_set_state(UNUSED void *state) {
|
|||
#endif
|
||||
|
||||
#ifdef __ANDROID__
|
||||
EXPORT size_t __mallinfo_narenas(void) {
|
||||
EXPORT size_t h_mallinfo_narenas(void) {
|
||||
// Consider region allocator to be an arena with index N_ARENA.
|
||||
return N_ARENA + 1;
|
||||
}
|
||||
|
||||
EXPORT size_t __mallinfo_nbins(void) {
|
||||
EXPORT size_t h_mallinfo_nbins(void) {
|
||||
return N_SIZE_CLASSES;
|
||||
}
|
||||
|
||||
|
@ -1824,7 +1824,7 @@ EXPORT size_t __mallinfo_nbins(void) {
|
|||
// uordblks: huge allocations
|
||||
// fsmblks: small allocations
|
||||
// (other fields are unused)
|
||||
EXPORT struct mallinfo __mallinfo_arena_info(UNUSED size_t arena) {
|
||||
EXPORT struct mallinfo h_mallinfo_arena_info(UNUSED size_t arena) {
|
||||
struct mallinfo info = {0};
|
||||
|
||||
#if CONFIG_STATS
|
||||
|
@ -1856,7 +1856,7 @@ EXPORT struct mallinfo __mallinfo_arena_info(UNUSED size_t arena) {
|
|||
// uordblks: nmalloc
|
||||
// fordblks: ndalloc
|
||||
// (other fields are unused)
|
||||
EXPORT struct mallinfo __mallinfo_bin_info(UNUSED size_t arena, UNUSED size_t bin) {
|
||||
EXPORT struct mallinfo h_mallinfo_bin_info(UNUSED size_t arena, UNUSED size_t bin) {
|
||||
struct mallinfo info = {0};
|
||||
|
||||
#if CONFIG_STATS
|
||||
|
|
13
h_malloc.h
13
h_malloc.h
|
@ -30,6 +30,11 @@ __BEGIN_DECLS
|
|||
#define h_malloc_get_state malloc_get_state
|
||||
#define h_malloc_set_state malloc_set_state
|
||||
|
||||
#define h_mallinfo_narenas mallinfo_narenas
|
||||
#define h_mallinfo_nbins mallinfo_nbins
|
||||
#define h_mallinfo_arena_info mallinfo_arena_info
|
||||
#define h_mallinfo_bin_info mallinfo_bin_info
|
||||
|
||||
#define h_iterate iterate
|
||||
#define h_malloc_disable malloc_disable
|
||||
#define h_malloc_enable malloc_enable
|
||||
|
@ -81,10 +86,10 @@ int h_malloc_set_state(void *state);
|
|||
|
||||
// Android extensions
|
||||
#ifdef __ANDROID__
|
||||
size_t __mallinfo_narenas(void);
|
||||
size_t __mallinfo_nbins(void);
|
||||
struct mallinfo __mallinfo_arena_info(size_t arena);
|
||||
struct mallinfo __mallinfo_bin_info(size_t arena, size_t bin);
|
||||
size_t h_mallinfo_narenas(void);
|
||||
size_t h_mallinfo_nbins(void);
|
||||
struct mallinfo h_mallinfo_arena_info(size_t arena);
|
||||
struct mallinfo h_mallinfo_bin_info(size_t arena, size_t bin);
|
||||
int h_iterate(uintptr_t base, size_t size, void (*callback)(uintptr_t ptr, size_t size, void *arg),
|
||||
void *arg);
|
||||
void h_malloc_disable(void);
|
||||
|
|
Loading…
Reference in New Issue