always check large_os_pages enabled option so it can be changed during the running of the program

This commit is contained in:
daan 2019-08-19 11:17:00 -07:00
parent 13ef8a049b
commit d2324f1c2a

View File

@ -70,7 +70,7 @@ size_t _mi_os_large_page_size() {
static bool use_large_os_page(size_t size, size_t alignment) {
// if we have access, check the size and alignment requirements
if (large_os_page_size == 0) return false;
if (large_os_page_size == 0 || !mi_option_is_enabled(mi_option_large_os_pages)) return false;
return ((size % large_os_page_size) == 0 && (alignment % large_os_page_size) == 0);
}