diff --git a/include/jemalloc/internal/tcache_types.h b/include/jemalloc/internal/tcache_types.h index 0806df9c..c8fd4c3e 100644 --- a/include/jemalloc/internal/tcache_types.h +++ b/include/jemalloc/internal/tcache_types.h @@ -17,9 +17,6 @@ typedef struct tcaches_s tcaches_t; #define TCACHE_STATE_PURGATORY ((tcache_t *)(uintptr_t)3) #define TCACHE_STATE_MAX TCACHE_STATE_PURGATORY -/* (1U << opt_lg_tcache_max) is used to compute tcache_maxclass. */ -#define LG_TCACHE_MAXCLASS_DEFAULT 15 - /* Number of allocation bytes between tcache incremental GCs. */ #define TCACHE_GC_INCR_BYTES 65536U diff --git a/src/tcache.c b/src/tcache.c index 9586556e..0366149d 100644 --- a/src/tcache.c +++ b/src/tcache.c @@ -11,7 +11,12 @@ /* Data. */ bool opt_tcache = true; -ssize_t opt_lg_tcache_max = LG_TCACHE_MAXCLASS_DEFAULT; + +/* + * (1U << opt_lg_tcache_max) is used to compute tcache_maxclass. This choice + * (32kb by default) works well as a default in practice. + */ +ssize_t opt_lg_tcache_max = 15; /* Reasonable defaults for min and max values. */ unsigned opt_tcache_nslots_small_min = 20;