diff options
author | Qi Wang <interwq@gwu.edu> | 2017-06-29 23:01:35 (GMT) |
---|---|---|
committer | Qi Wang <interwq@gmail.com> | 2017-06-30 00:01:18 (GMT) |
commit | cb032781bdfd778325284472c25172713414023f (patch) | |
tree | 23b7b3a34bf47ae7fac457934d8a2c9f992e5671 /src/jemalloc.c | |
parent | 2b31cf5bd272216e4b20c1463bb696b4c1e9a8e5 (diff) | |
download | jemalloc-cb032781bdfd778325284472c25172713414023f.zip jemalloc-cb032781bdfd778325284472c25172713414023f.tar.gz jemalloc-cb032781bdfd778325284472c25172713414023f.tar.bz2 |
Add extent_grow_mtx in pre_ / post_fork handlers.
This fixed the issue that could cause the child process to stuck after fork.
Diffstat (limited to 'src/jemalloc.c')
-rw-r--r-- | src/jemalloc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/jemalloc.c b/src/jemalloc.c index 511710c..0ee8ad4 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c @@ -3049,7 +3049,7 @@ _malloc_prefork(void) background_thread_prefork1(tsd_tsdn(tsd)); } /* Break arena prefork into stages to preserve lock order. */ - for (i = 0; i < 7; i++) { + for (i = 0; i < 8; i++) { for (j = 0; j < narenas; j++) { if ((arena = arena_get(tsd_tsdn(tsd), j, false)) != NULL) { @@ -3075,6 +3075,9 @@ _malloc_prefork(void) case 6: arena_prefork6(tsd_tsdn(tsd), arena); break; + case 7: + arena_prefork7(tsd_tsdn(tsd), arena); + break; default: not_reached(); } } |