[PATCH 9/9] malloc: set default tcache fill count to 16

Dev Jain dev.jain@arm.com
Fri Oct 17 09:07:07 GMT 2025


Now that the fastbins are gone, set the default per size class length of
tcache to 16. We notice that doing this retains the original performance
of malloc.
---
 malloc/malloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/malloc/malloc.c b/malloc/malloc.c
index 620527c9c6..57a4a26201 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -314,7 +314,7 @@
 
 /* This is another arbitrary limit, which tunables can change.  Each
    tcache bin will hold at most this number of chunks.  */
-# define TCACHE_FILL_COUNT 7
+# define TCACHE_FILL_COUNT 16
 
 /* Maximum chunks in tcache bins for tunables.  This value must fit the range
    of tcache->num_slots[] entries, else they may overflow.  */
-- 
2.43.0



More information about the Libc-alpha mailing list