]> git.ipfire.org Git - thirdparty/glibc.git/commit
Small tcache improvements
authorWilco Dijkstra <wdijkstr@arm.com>
Fri, 17 May 2019 17:16:20 +0000 (18:16 +0100)
committerArjun Shankar <ashankar@redhat.com>
Wed, 30 Oct 2019 11:01:42 +0000 (12:01 +0100)
commitf88c59f4657ac2e0bab8f51f60022ecbe7f12e2e
tree72d11950c9a3d2fa02f0db6f666265f120115c79
parent3640758943c856268bc12a3307838c2a65d2f9ea
Small tcache improvements

Change the tcache->counts[] entries to uint16_t - this removes
the limit set by char and allows a larger tcache.  Remove a few
redundant asserts.

bench-malloc-thread with 4 threads is ~15% faster on Cortex-A72.

Reviewed-by: DJ Delorie <dj@redhat.com>
* malloc/malloc.c (MAX_TCACHE_COUNT): Increase to UINT16_MAX.
(tcache_put): Remove redundant assert.
(tcache_get): Remove redundant asserts.
(__libc_malloc): Check tcache count is not zero.
* manual/tunables.texi (glibc.malloc.tcache_count): Update maximum.

(cherry picked from commit 1f50f2ad854c84ead522bfc7331b46dbe6057d53)
ChangeLog
malloc/malloc.c
manual/tunables.texi