Fix tcaches mutex pre- / post-fork handling.

This commit is contained in:
Qi Wang 2019-08-07 20:12:25 -07:00 committed by Qi Wang
parent 07ce2434bf
commit 87e2400cbb

View File

@ -778,21 +778,15 @@ tcache_boot(tsdn_t *tsdn) {
void
tcache_prefork(tsdn_t *tsdn) {
if (!config_prof && opt_tcache) {
malloc_mutex_prefork(tsdn, &tcaches_mtx);
}
malloc_mutex_prefork(tsdn, &tcaches_mtx);
}
void
tcache_postfork_parent(tsdn_t *tsdn) {
if (!config_prof && opt_tcache) {
malloc_mutex_postfork_parent(tsdn, &tcaches_mtx);
}
malloc_mutex_postfork_parent(tsdn, &tcaches_mtx);
}
void
tcache_postfork_child(tsdn_t *tsdn) {
if (!config_prof && opt_tcache) {
malloc_mutex_postfork_child(tsdn, &tcaches_mtx);
}
malloc_mutex_postfork_child(tsdn, &tcaches_mtx);
}