aboutsummaryrefslogtreecommitdiff
path: root/dep/jemalloc/src/tsd.c
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2018-05-11 20:36:14 +0200
committerjackpoz <giacomopoz@gmail.com>2018-05-12 09:37:51 +0200
commit8fe74bf0f90aab0b23d5ff21079cba4201bb4fdf (patch)
treedbd187bf59f55f81cb81d01acd4998077553fb9b /dep/jemalloc/src/tsd.c
parente5b3814020fe1a288f4cd8bbf0289bd0abfd5c10 (diff)
Dep/Jemalloc: Update to Jemalloc 5.1.0
Diffstat (limited to 'dep/jemalloc/src/tsd.c')
-rw-r--r--dep/jemalloc/src/tsd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/dep/jemalloc/src/tsd.c b/dep/jemalloc/src/tsd.c
index f968992f2b5..c1430682dd5 100644
--- a/dep/jemalloc/src/tsd.c
+++ b/dep/jemalloc/src/tsd.c
@@ -71,6 +71,16 @@ tsd_data_init(tsd_t *tsd) {
*/
rtree_ctx_data_init(tsd_rtree_ctxp_get_unsafe(tsd));
+ /*
+ * A nondeterministic seed based on the address of tsd reduces
+ * the likelihood of lockstep non-uniform cache index
+ * utilization among identical concurrent processes, but at the
+ * cost of test repeatability. For debug builds, instead use a
+ * deterministic seed.
+ */
+ *tsd_offset_statep_get(tsd) = config_debug ? 0 :
+ (uint64_t)(uintptr_t)tsd;
+
return tsd_tcache_enabled_data_init(tsd);
}