mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-06-27 06:15:37 +03:00
Add pthread_atfork(3) feature test.
Some versions of Android provide a pthreads library without providing pthread_atfork(), so in practice a separate feature test is necessary for the latter.
This commit is contained in:
parent
62f2d84e7a
commit
949a27fc32
3 changed files with 14 additions and 2 deletions
|
|
@ -1411,8 +1411,9 @@ malloc_init_hard_recursible(void)
|
|||
|
||||
ncpus = malloc_ncpus();
|
||||
|
||||
#if (!defined(JEMALLOC_MUTEX_INIT_CB) && !defined(JEMALLOC_ZONE) \
|
||||
&& !defined(_WIN32) && !defined(__native_client__))
|
||||
#if (defined(JEMALLOC_HAVE_PTHREAD_ATFORK) && !defined(JEMALLOC_MUTEX_INIT_CB) \
|
||||
&& !defined(JEMALLOC_ZONE) && !defined(_WIN32) && \
|
||||
!defined(__native_client__))
|
||||
/* LinuxThreads' pthread_atfork() allocates. */
|
||||
if (pthread_atfork(jemalloc_prefork, jemalloc_postfork_parent,
|
||||
jemalloc_postfork_child) != 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue