| 391 | #endif |
| 392 | |
| 393 | bool |
| 394 | pages_boot(void) { |
| 395 | os_page = os_page_detect(); |
| 396 | if (os_page > PAGE) { |
| 397 | malloc_write("<jemalloc>: Unsupported system page size\n"); |
| 398 | if (opt_abort) { |
| 399 | abort(); |
| 400 | } |
| 401 | return true; |
| 402 | } |
| 403 | |
| 404 | #ifndef _WIN32 |
| 405 | mmap_flags = MAP_PRIVATE | MAP_ANON; |
| 406 | #endif |
| 407 | |
| 408 | #ifdef JEMALLOC_SYSCTL_VM_OVERCOMMIT |
| 409 | os_overcommits = os_overcommits_sysctl(); |
| 410 | #elif defined(JEMALLOC_PROC_SYS_VM_OVERCOMMIT_MEMORY) |
| 411 | os_overcommits = os_overcommits_proc(); |
| 412 | # ifdef MAP_NORESERVE |
| 413 | if (os_overcommits) { |
| 414 | mmap_flags |= MAP_NORESERVE; |
| 415 | } |
| 416 | # endif |
| 417 | #else |
| 418 | os_overcommits = false; |
| 419 | #endif |
| 420 | |
| 421 | return false; |
| 422 | } |
no test coverage detected