Remove bad assertions in malloc_{pre,post}fork().
Remove assertions that malloc_{pre,post}fork() are only called if threading is enabled. This was true of these functions in the context of FreeBSD's libc, but now the functions are called unconditionally as a result of registering them with pthread_atfork().
This commit is contained in:
parent
79d660d35d
commit
28177d466f
@ -1394,9 +1394,7 @@ JEMALLOC_P(dallocm)(void *ptr, int flags)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* The following functions are used by threading libraries for protection of
|
* The following functions are used by threading libraries for protection of
|
||||||
* malloc during fork(). These functions are only called if the program is
|
* malloc during fork().
|
||||||
* running in threaded mode, so there is no need to check whether the program
|
|
||||||
* is threaded here.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1404,8 +1402,6 @@ jemalloc_prefork(void)
|
|||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
assert(isthreaded);
|
|
||||||
|
|
||||||
/* Acquire all mutexes in a safe order. */
|
/* Acquire all mutexes in a safe order. */
|
||||||
|
|
||||||
malloc_mutex_lock(&arenas_lock);
|
malloc_mutex_lock(&arenas_lock);
|
||||||
@ -1432,8 +1428,6 @@ jemalloc_postfork(void)
|
|||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
assert(isthreaded);
|
|
||||||
|
|
||||||
/* Release all mutexes, now that fork() has completed. */
|
/* Release all mutexes, now that fork() has completed. */
|
||||||
|
|
||||||
#ifdef JEMALLOC_SWAP
|
#ifdef JEMALLOC_SWAP
|
||||||
|
Loading…
Reference in New Issue
Block a user