mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
malloc: Improve malloc initialization
Move malloc initialization to __libc_early_init. Use a hidden __ptmalloc_init for initialization and a weak call to avoid pulling in the system malloc in a static binary. All previous initialization checks can now be removed. Reviewed-by: Florian Weimer <fweimer@redhat.com>
This commit is contained in:
@ -389,7 +389,7 @@ initialize_malloc_check (void)
|
||||
{
|
||||
/* This is the copy of the malloc initializer that we pulled in along with
|
||||
malloc-check. This does not affect any of the libc malloc structures. */
|
||||
ptmalloc_init ();
|
||||
__ptmalloc_init ();
|
||||
TUNABLE_GET (check, int32_t, TUNABLE_CALLBACK (set_mallopt_check));
|
||||
return __is_malloc_debug_enabled (MALLOC_CHECK_HOOK);
|
||||
}
|
||||
|
Reference in New Issue
Block a user