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/14581] glibc leaks memory and do not reuse after free (leading to unlimited RSS growth)


http://sourceware.org/bugzilla/show_bug.cgi?id=14581

--- Comment #3 from Kirill Korotaev <dev at parallels dot com> 2012-09-15 10:43:46 UTC ---
one more finding:  not reproducible if replace memalign with malloc() (even if
add paddings as memalign does).

Comment from ANK on this:
Interesting.

memalign() in glibc is very simple: it is just malloc(size + alignment +
some_small_number)
then tail and head returned to pool.

Probably, this is the culprit. Long shot: when result of memalign is freed,
malloc
does not merge fragments, so hole will be of three free parts: head, body, tail
and it is unusable for future memalign.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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]