Hold arenas_mtx across (still unused) _malloc_pre/postfork (PR 47428).
This commit is contained in:
parent
66ee53e17c
commit
f3a56da0a0
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: jemalloc.c,v 1.32 2014/02/25 12:13:19 martin Exp $ */
|
||||
/* $NetBSD: jemalloc.c,v 1.33 2014/07/16 19:09:53 riastradh Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 2006,2007 Jason Evans <jasone@FreeBSD.org>.
|
||||
@ -118,7 +118,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
/* __FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.147 2007/06/15 22:00:16 jasone Exp $"); */
|
||||
__RCSID("$NetBSD: jemalloc.c,v 1.32 2014/02/25 12:13:19 martin Exp $");
|
||||
__RCSID("$NetBSD: jemalloc.c,v 1.33 2014/07/16 19:09:53 riastradh Exp $");
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include "libc_private.h"
|
||||
@ -3928,7 +3928,6 @@ _malloc_prefork(void)
|
||||
if (arenas[i] != NULL)
|
||||
malloc_mutex_lock(&arenas[i]->mtx);
|
||||
}
|
||||
malloc_mutex_unlock(&arenas_mtx);
|
||||
|
||||
malloc_mutex_lock(&base_mtx);
|
||||
|
||||
@ -3946,7 +3945,6 @@ _malloc_postfork(void)
|
||||
|
||||
malloc_mutex_unlock(&base_mtx);
|
||||
|
||||
malloc_mutex_lock(&arenas_mtx);
|
||||
for (i = 0; i < narenas; i++) {
|
||||
if (arenas[i] != NULL)
|
||||
malloc_mutex_unlock(&arenas[i]->mtx);
|
||||
|
Loading…
Reference in New Issue
Block a user