[Bug malloc/33886] Fastbin can grow indefinitely and never release
roche at httrack dot com
sourceware-bugzilla@sourceware.org
Wed Mar 18 17:55:01 GMT 2026
https://sourceware.org/bugzilla/show_bug.cgi?id=33886
--- Comment #13 from Xavier Roche <roche at httrack dot com> ---
Note: the latest v3 patch 86% recovery
- Frees above page size get immediate madvise.
- Sub-page frees accumulate and trigger madvise when 256KB has built up.
This seems to be the sweet-spot: madvises large frees immediately (where the
memory savings justify the syscall cost) and batches small frees (where
individual madvise calls would cost more than the pages they release).
This is not as good as the first patch in term of recovery but reduce the
syscalls.
Tell me what you think. More numbers on the test bench:
https://github.com/xroche/glibc-malloc-hoarding-reproducer/tree/master/patch
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list