This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug malloc/19048] Avoid corruption of free_list
- From: "paulo.cesar.pereira.de.andrade at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 09 Oct 2015 16:26:45 +0000
- Subject: [Bug malloc/19048] Avoid corruption of free_list
- Auto-submitted: auto-generated
- References: <bug-19048-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=19048
--- Comment #9 from Paulo Andrade <paulo.cesar.pereira.de.andrade at gmail dot com> ---
Created attachment 8700
--> https://sourceware.org/bugzilla/attachment.cgi?id=8700&action=edit
glibc-arena.patch
Alternate simpler patch (from a test rpm build) that that makes
the exiting thread arena the free_list, like in current glibc,
with the following checks:
o if the thread arena it is already free_list do nothing
o if the thread arena is in free_list remove it
After the above checks, do as current glibc, making the arena
the first one to be reused.
The previous patch did put the exiting thread arena at the tail
of the free_list, the new one puts it in the head, and, in the
common case of it already being in free_list, exits early the
traversal, as it should be at most once in the list.
The speed improvement, with either patch makes some tests run
more than 100 times faster, making glibc malloc speed comparable
to jemallc (that was the user complaint, jemalloc running 100
times faster than glibc).
--
You are receiving this mail because:
You are on the CC list for the bug.