| 108 | |
| 109 | #if !defined(MI_USE_SBRK) && !defined(__wasi__) |
| 110 | static bool use_large_os_page(size_t size, size_t alignment) { |
| 111 | // if we have access, check the size and alignment requirements |
| 112 | if (large_os_page_size == 0 || !mi_option_is_enabled(mi_option_large_os_pages)) return false; |
| 113 | return ((size % large_os_page_size) == 0 && (alignment % large_os_page_size) == 0); |
| 114 | } |
| 115 | #endif |
| 116 | |
| 117 | // round to a good OS allocation size (bounded by max 12.5% waste) |
no test coverage detected