[PATCH] malloc: Enable merging of remainders in memalign (bug 30723)
DJ Delorie
dj@redhat.com
Wed Aug 9 23:10:43 GMT 2023
"Zack Weinberg" <zack@owlfolio.org> writes:
> but could we have a more aggressive consolidation pass, capable of
> pulling stuff back out of the fastbins, that was triggered at least
> some fraction of the times we think we need to expand the heap?
Yes, except:
1. We don't currently keep track of the status of fastbins (how many
chunks, now much memory) to have as a metric, and
2. We don't have a good bit of logic to decide which API call will be
interrupted to do the consolidation.
In this day and age, I'd suggest a separate consolidation thread, but
that would mean we'd have to review our atomics etc and make sure there
weren't any unneeded delays or locks.
More information about the Libc-alpha
mailing list