[PATCH][malloc] Improve malloc initialization sequence
Florian Weimer
fweimer@redhat.com
Fri Sep 29 19:36:00 GMT 2017
On 09/29/2017 06:48 PM, Wilco Dijkstra wrote:
> thread attempting to use the arena in parallel waits on us till we
> finish. */
> __libc_lock_lock (main_arena.mutex);
> - malloc_consolidate (&main_arena);
> + malloc_init_state (&main_arena);
The locking is unnecessary. You should remove it and call
malloc_init_state before the tunables preprocessor conditional.
I believe this fixes bug 22159, so please reference this bug (both in
the commit message and the ChangeLog).
Thanks,
Florian
More information about the Libc-alpha
mailing list