jemalloc/backport-Jemalloc-5.2.1-patch-3-fix-tcaches-mutex-pre-post-fork-handling.patch
xigaoxinyan df7ec938d1 update
2021-12-30 15:37:01 +08:00

29 lines
763 B
Diff

diff -Nur jemalloc-5.2.1/src/tcache.c tmp/src/tcache.c
--- jemalloc-5.2.1/src/tcache.c 2019-08-06 04:02:00.000000000 +0800
+++ tmp/src/tcache.c 2021-11-16 19:12:46.889312051 +0800
@@ -778,21 +778,15 @@
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);
}