From 4dec507546040896338d8bbdb2075c7ad3a4b9f3 Mon Sep 17 00:00:00 2001 From: Qi Wang Date: Wed, 5 Apr 2017 22:04:12 -0700 Subject: [PATCH] Bypass witness_fork in TSD when !config_debug. With the tcache change, we plan to leave some blank space when !config_debug (unused tbins, witnesses) at the end of the tsd. Let's not touch the memory. --- src/witness.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/witness.c b/src/witness.c index 034ea92b..cbffaeaa 100644 --- a/src/witness.c +++ b/src/witness.c @@ -96,16 +96,25 @@ witnesses_cleanup(tsd_t *tsd) { void witness_prefork(tsd_t *tsd) { + if (!config_debug) { + return; + } tsd_witness_fork_set(tsd, true); } void witness_postfork_parent(tsd_t *tsd) { + if (!config_debug) { + return; + } tsd_witness_fork_set(tsd, false); } void witness_postfork_child(tsd_t *tsd) { + if (!config_debug) { + return; + } #ifndef JEMALLOC_MUTEX_INIT_CB witness_list_t *witnesses;