[PATCH] malloc: Use correct C11 atomics for fastbin
Florian Weimer
fweimer@redhat.com
Mon Dec 12 11:56:09 GMT 2022
* DJ Delorie via Libc-alpha:
> Zack Weinberg via Libc-alpha <libc-alpha@sourceware.org> writes:
>> 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,
>
> There's a couple of things, but they're technical details, not political
> ones:
>
> * There's a copy of a "mini-malloc" in the dynamic loader that needs to
> be somewhat compatible with the full copy in libc.so so that data
> allocated in the loader can be used later.
This is not actually true, no compatibility is required. We have manual
tracking for allocations and avoid freeing them with the wrong
allocator. Otherwise interposed mallocs wouldn't work.
Thanks,
Florian
More information about the Libc-alpha
mailing list