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.
This commit is contained in:
Qi Wang 2017-04-05 22:04:12 -07:00 committed by Qi Wang
parent 0fba57e579
commit 4dec507546

View File

@ -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;