diff options
author | Jason Evans <jasone@canonware.com> | 2016-11-17 23:14:57 (GMT) |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2016-11-17 23:16:27 (GMT) |
commit | 949a27fc329e6a55a94857a401765d017f13f8ff (patch) | |
tree | 16edfdcad26793da9e87639ab05f014c864480c1 /src/jemalloc.c | |
parent | 62f2d84e7aebaa25df32a0ae882cc856e5218687 (diff) | |
download | jemalloc-949a27fc329e6a55a94857a401765d017f13f8ff.zip jemalloc-949a27fc329e6a55a94857a401765d017f13f8ff.tar.gz jemalloc-949a27fc329e6a55a94857a401765d017f13f8ff.tar.bz2 |
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.
Diffstat (limited to 'src/jemalloc.c')
-rw-r--r-- | src/jemalloc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/jemalloc.c b/src/jemalloc.c index 14c1c4d..baead66 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c @@ -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) { |