summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Evans <je@facebook.com>2010-09-20 18:24:24 (GMT)
committerJason Evans <je@facebook.com>2010-09-20 18:24:24 (GMT)
commit28177d466fbbfd10927b4d05655c2ec6711faa1b (patch)
tree3732498c5c7441bff6f4adb9ef8fdd0657cd7596
parent79d660d35d30f60ccd41474cff20f00f215f767a (diff)
downloadjemalloc-28177d466fbbfd10927b4d05655c2ec6711faa1b.zip
jemalloc-28177d466fbbfd10927b4d05655c2ec6711faa1b.tar.gz
jemalloc-28177d466fbbfd10927b4d05655c2ec6711faa1b.tar.bz2
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().
-rw-r--r--jemalloc/src/jemalloc.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/jemalloc/src/jemalloc.c b/jemalloc/src/jemalloc.c
index be3d7da..40c3a63 100644
--- a/jemalloc/src/jemalloc.c
+++ b/jemalloc/src/jemalloc.c
@@ -1394,9 +1394,7 @@ JEMALLOC_P(dallocm)(void *ptr, int flags)
/*
* The following functions are used by threading libraries for protection of
- * malloc during fork(). These functions are only called if the program is
- * running in threaded mode, so there is no need to check whether the program
- * is threaded here.
+ * malloc during fork().
*/
void
@@ -1404,8 +1402,6 @@ jemalloc_prefork(void)
{
unsigned i;
- assert(isthreaded);
-
/* Acquire all mutexes in a safe order. */
malloc_mutex_lock(&arenas_lock);
@@ -1432,8 +1428,6 @@ jemalloc_postfork(void)
{
unsigned i;
- assert(isthreaded);
-
/* Release all mutexes, now that fork() has completed. */
#ifdef JEMALLOC_SWAP