[Bug malloc/33886] Fastbin can grow indefinitely and never release

wdijkstr at arm dot com sourceware-bugzilla@sourceware.org
Fri Mar 20 16:15:07 GMT 2026


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

--- Comment #17 from Wilco <wdijkstr at arm dot com> ---
(In reply to Xavier Roche from comment #16)
> Last note: we could also
> 
> - MADV_DONTNEED for blocks larger than a threshold (eg. 128K)
> - MADV_FREE for smaller ones

Yes that could work - however you may end up doing MADV_FREE first and later
MADV_DONTNEED as blocks get merged. I wouldn't try to overcomplicate it, at
first it would be great to have a simple change that can return memory with
little overhead.

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


More information about the Glibc-bugs mailing list