MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / use_large_os_page

Function use_large_os_page

3rd/mimalloc-2.0.9/src/os.c:110–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108
109#if !defined(MI_USE_SBRK) && !defined(__wasi__)
110static 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)

Callers 2

mi_win_virtual_allocFunction · 0.85
mi_unix_mmapFunction · 0.85

Calls 1

mi_option_is_enabledFunction · 0.85

Tested by

no test coverage detected