mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-05 18:06:14 +03:00
Add extent_grow_mtx in pre_ / post_fork handlers.
This fixed the issue that could cause the child process to stuck after fork.
This commit is contained in:
parent
2b31cf5bd2
commit
cb032781bd
3 changed files with 16 additions and 5 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue