aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads/Examples
diff options
context:
space:
mode:
authorWilco Dijkstra <wilco.dijkstra@arm.com>2025-03-24 18:23:37 +0000
committerWilco Dijkstra <wilco.dijkstra@arm.com>2025-04-14 15:08:24 +0000
commitb0cb99bef5a2142563c49c908c2139310904404a (patch)
tree5e6142edd87f031532725c664dddb33ba3100af2 /linuxthreads/Examples
parent9df92958c196f7a0be51a204a19caafe2f45a22d (diff)
downloadglibc-b0cb99bef5a2142563c49c908c2139310904404a.zip
glibc-b0cb99bef5a2142563c49c908c2139310904404a.tar.gz
glibc-b0cb99bef5a2142563c49c908c2139310904404a.tar.bz2
malloc: Move mmap code out of __libc_free hotpath
Currently __libc_free checks for a freed mmap chunk in the fast path. Also errno is always saved and restored to preserve it. Since mmap chunks are larger than the largest tcache chunk, it is safe to delay this and handle tcache, smallbin and medium bin blocks first. Move saving of errno to cases that actually need it. Remove a safety check that fails on mmap chunks and a check that mmap chunks cannot be added to tcache. Performance of bench-malloc-thread improves by 9.2% for 1 thread and 6.9% for 32 threads on Neoverse V2. Reviewed-by: DJ Delorie <dj@redhat.com> Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'linuxthreads/Examples')
0 files changed, 0 insertions, 0 deletions