[PATCH] malloc: Use _int_free_chunk for remainders
DJ Delorie
dj@redhat.com
Mon Mar 24 21:33:00 GMT 2025
Wilco Dijkstra <Wilco.Dijkstra@arm.com> writes:
> When splitting a chunk, release the tail part by calling _int_free_chunk.
> This avoids inserting random blocks into tcache that were never requested
> by the user. Fragmentation will be worse if they are never used again.
> Note if the tail is fairly small, we could avoid splitting it at all.
> Also remove an oddly placed initialization of tcache in __libc_realloc.
LGTM
Reviewed-by: DJ Delorie <dj@redhat.com>
More information about the Libc-alpha
mailing list