mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-22 04:03:11 +00:00
Consistently use malloc_mutex_prefork().
Consistently use malloc_mutex_prefork() instead of malloc_mutex_lock() in all prefork functions.
This commit is contained in:
@@ -368,7 +368,7 @@ void
|
||||
chunk_prefork(void)
|
||||
{
|
||||
|
||||
malloc_mutex_lock(&chunks_mtx);
|
||||
malloc_mutex_prefork(&chunks_mtx);
|
||||
if (config_ivsalloc)
|
||||
rtree_prefork(chunks_rtree);
|
||||
chunk_dss_prefork();
|
||||
|
||||
@@ -929,7 +929,7 @@ void
|
||||
ctl_prefork(void)
|
||||
{
|
||||
|
||||
malloc_mutex_lock(&ctl_mtx);
|
||||
malloc_mutex_prefork(&ctl_mtx);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -1245,10 +1245,10 @@ prof_prefork(void)
|
||||
if (opt_prof) {
|
||||
unsigned i;
|
||||
|
||||
malloc_mutex_lock(&bt2ctx_mtx);
|
||||
malloc_mutex_lock(&prof_dump_seq_mtx);
|
||||
malloc_mutex_prefork(&bt2ctx_mtx);
|
||||
malloc_mutex_prefork(&prof_dump_seq_mtx);
|
||||
for (i = 0; i < PROF_NCTX_LOCKS; i++)
|
||||
malloc_mutex_lock(&ctx_locks[i]);
|
||||
malloc_mutex_prefork(&ctx_locks[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user