Initialize data structures which may trigger recursive allocation. */
| 1343 | |
| 1344 | /* Initialize data structures which may trigger recursive allocation. */ |
| 1345 | static bool |
| 1346 | malloc_init_hard_recursible(void) { |
| 1347 | malloc_init_state = malloc_init_recursible; |
| 1348 | |
| 1349 | ncpus = malloc_ncpus(); |
| 1350 | |
| 1351 | #if (defined(JEMALLOC_HAVE_PTHREAD_ATFORK) && !defined(JEMALLOC_MUTEX_INIT_CB) \ |
| 1352 | && !defined(JEMALLOC_ZONE) && !defined(_WIN32) && \ |
| 1353 | !defined(__native_client__)) |
| 1354 | /* LinuxThreads' pthread_atfork() allocates. */ |
| 1355 | if (pthread_atfork(jemalloc_prefork, jemalloc_postfork_parent, |
| 1356 | jemalloc_postfork_child) != 0) { |
| 1357 | malloc_write("<jemalloc>: Error in pthread_atfork()\n"); |
| 1358 | if (opt_abort) { |
| 1359 | abort(); |
| 1360 | } |
| 1361 | return true; |
| 1362 | } |
| 1363 | #endif |
| 1364 | |
| 1365 | if (background_thread_boot0()) { |
| 1366 | return true; |
| 1367 | } |
| 1368 | |
| 1369 | return false; |
| 1370 | } |
| 1371 | |
| 1372 | static unsigned |
| 1373 | malloc_narenas_default(void) { |
no test coverage detected