mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-24 13:53:11 +00:00
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:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user