This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug malloc/19048] Avoid corruption of free_list


https://sourceware.org/bugzilla/show_bug.cgi?id=19048

--- Comment #2 from Paulo Andrade <paulo.cesar.pereira.de.andrade at gmail dot com> ---
Created attachment 8668
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8668&action=edit
arena_test.pl

arena_test.c creates several threads in a loop:

2 threads for 32 sec
4 threads for 16 sec
8 threads for 8 sec
16 threads for 4 sec
32 threads for 2 sec
64 threads for 1 sec

every thread allocates some memory. When a thread leaves,
it attaches gdb and reads the value of the arena "key",
__libc_tsd_MALLOC for every thread, using arena_test.pl,
and prints a summary for every loop.

It shows that the proposed patch better distributes the
arenas among threads, while current glibc, and older versions,
at least as of the original commit in 2009 creating
arena_thread_freeres will use the same arena for most
threads.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]