[PATCH] malloc: Use correct C11 atomics for fastbin

Zack Weinberg zack@owlfolio.org
Mon Dec 5 18:39:37 GMT 2022


On 2022-12-02 1:55 PM, DJ Delorie via Libc-alpha wrote:
> Wilco Dijkstra <Wilco.Dijkstra@arm.com> writes:
>> If we want to make tcache actually work, it will have to support far more
>> allocations, particularly for smaller sizes.
> 
> You can test that with a tunable; the max count per bin is runtime
> tunable.
> 
> But yeah, the point of tcache is to have a few of many sizes for fast
> allocations.  Fastbins has a lot of a few small sizes.  Testing showed
> that both were required for best performance with the average
> application.

Every time we start talking about fastbins vs tcache again I start 
wondering, again, what's stopping us from replacing the entire malloc 
implementation with jemalloc, or any other implementation designed less 
than 20 years ago.

zw



More information about the Libc-alpha mailing list