about summary refs log tree commit diff
path: root/manual
diff options
context:
space:
mode:
authorWilco Dijkstra <wdijkstr@arm.com>2019-05-17 18:16:20 +0100
committerArjun Shankar <ashankar@redhat.com>2019-10-30 12:01:42 +0100
commitf88c59f4657ac2e0bab8f51f60022ecbe7f12e2e (patch)
tree72d11950c9a3d2fa02f0db6f666265f120115c79 /manual
parent3640758943c856268bc12a3307838c2a65d2f9ea (diff)
downloadglibc-f88c59f4657ac2e0bab8f51f60022ecbe7f12e2e.tar.gz
glibc-f88c59f4657ac2e0bab8f51f60022ecbe7f12e2e.tar.xz
glibc-f88c59f4657ac2e0bab8f51f60022ecbe7f12e2e.zip
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)
Diffstat (limited to 'manual')
-rw-r--r--manual/tunables.texi2
1 files changed, 1 insertions, 1 deletions
diff --git a/manual/tunables.texi b/manual/tunables.texi
index d8c22dd29f..74ae253ebf 100644
--- a/manual/tunables.texi
+++ b/manual/tunables.texi
@@ -188,7 +188,7 @@ per-thread cache.  The default (and maximum) value is 1032 bytes on
 
 @deftp Tunable glibc.malloc.tcache_count
 The maximum number of chunks of each size to cache. The default is 7.
-The upper limit is 127.  If set to zero, the per-thread cache is effectively
+The upper limit is 65535.  If set to zero, the per-thread cache is effectively
 disabled.
 
 The approximate maximum overhead of the per-thread cache is thus equal