1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

Cleanups of malloc

Remove ugly names and unnecessary wrappers.
This commit is contained in:
Ulrich Drepper
2012-01-31 18:49:22 -05:00
parent 41b81892f1
commit 3b49edc04b
4 changed files with 145 additions and 195 deletions

View File

@ -30,7 +30,7 @@ malloc_hook_ini(size_t sz, const __malloc_ptr_t caller)
{
__malloc_hook = NULL;
ptmalloc_init();
return public_mALLOc(sz);
return __libc_malloc(sz);
}
static void*
@ -39,7 +39,7 @@ realloc_hook_ini(void* ptr, size_t sz, const __malloc_ptr_t caller)
__malloc_hook = NULL;
__realloc_hook = NULL;
ptmalloc_init();
return public_rEALLOc(ptr, sz);
return __libc_realloc(ptr, sz);
}
static void*
@ -47,7 +47,7 @@ memalign_hook_ini(size_t alignment, size_t sz, const __malloc_ptr_t caller)
{
__memalign_hook = NULL;
ptmalloc_init();
return public_mEMALIGn(alignment, sz);
return __libc_memalign(alignment, sz);
}
/* Whether we are using malloc checking. */
@ -389,13 +389,13 @@ struct malloc_save_state {
};
void*
public_gET_STATe(void)
__malloc_get_state(void)
{
struct malloc_save_state* ms;
int i;
mbinptr b;
ms = (struct malloc_save_state*)public_mALLOc(sizeof(*ms));
ms = (struct malloc_save_state*)__libc_malloc(sizeof(*ms));
if (!ms)
return 0;
(void)mutex_lock(&main_arena.mutex);
@ -440,7 +440,7 @@ public_gET_STATe(void)
}
int
public_sET_STATe(void* msptr)
__malloc_set_state(void* msptr)
{
struct malloc_save_state* ms = (struct malloc_save_state*)msptr;
size_t i;