summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2015-05-20 00:47:16 (GMT)
committerJason Evans <jasone@canonware.com>2015-05-20 00:47:16 (GMT)
commit836bbe9951a903b2d76af53dfb3ad53ad186f8b9 (patch)
treea22d40fc01bba7888657d7ad761c29400cd401b8 /include
parent6591ff09d80e11f36603a75b32dc6a9b81fb3d47 (diff)
downloadjemalloc-836bbe9951a903b2d76af53dfb3ad53ad186f8b9.zip
jemalloc-836bbe9951a903b2d76af53dfb3ad53ad186f8b9.tar.gz
jemalloc-836bbe9951a903b2d76af53dfb3ad53ad186f8b9.tar.bz2
Impose a minimum tcache count for small size classes.
Now that small allocation runs have fewer regions due to run metadata residing in chunk headers, an explicit minimum tcache count is needed to make sure that tcache adequately amortizes synchronization overhead.
Diffstat (limited to 'include')
-rw-r--r--include/jemalloc/internal/tcache.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/jemalloc/internal/tcache.h b/include/jemalloc/internal/tcache.h
index d2443b1..493f457 100644
--- a/include/jemalloc/internal/tcache.h
+++ b/include/jemalloc/internal/tcache.h
@@ -17,6 +17,11 @@ typedef struct tcaches_s tcaches_t;
#define TCACHE_STATE_MAX TCACHE_STATE_PURGATORY
/*
+ * Absolute minimum number of cache slots for each small bin.
+ */
+#define TCACHE_NSLOTS_SMALL_MIN 20
+
+/*
* Absolute maximum number of cache slots for each small bin in the thread
* cache. This is an additional constraint beyond that imposed as: twice the
* number of regions per run for this size class.