]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
malloc: set default tcache fill count to 16
authorDev Jain <dev.jain@arm.com>
Wed, 10 Dec 2025 15:03:22 +0000 (15:03 +0000)
committerWilco Dijkstra <wilco.dijkstra@arm.com>
Wed, 17 Dec 2025 15:32:53 +0000 (15:32 +0000)
Now that the fastbins are gone, set the default per size class length of
tcache to 16. We observe that doing this retains the original performance
of malloc.

Reviewed-by: DJ Delorie <dj@redhat.com>
malloc/malloc.c

index eaf3fc36ca039b929361ae3e9a04ea86dd6be94a..08ca1879ac7bfab2de7310f094ec7fe639c96f99 100644 (file)
 
 /* 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.  */