Don't use pthread_atfork to register prefork/postfork handlers on OSX

OSX libc calls zone allocators' force_lock/force_unlock already.
This commit is contained in:
Mike Hommey 2012-03-28 09:53:16 +02:00 committed by Jason Evans
parent d4be8b7b6e
commit e77fa59ece

View File

@ -575,7 +575,7 @@ malloc_init_hard(void)
malloc_conf_init(); malloc_conf_init();
#ifndef JEMALLOC_MUTEX_INIT_CB #if (!defined(JEMALLOC_MUTEX_INIT_CB) && !defined(JEMALLOC_ZONE))
/* Register fork handlers. */ /* Register fork handlers. */
if (pthread_atfork(jemalloc_prefork, jemalloc_postfork_parent, if (pthread_atfork(jemalloc_prefork, jemalloc_postfork_parent,
jemalloc_postfork_child) != 0) { jemalloc_postfork_child) != 0) {