fix 1GB huge page flag on Linux

This commit is contained in:
daan 2019-08-25 13:15:26 -07:00
parent 23c35f4aba
commit 6e360d34ee

View file

@ -353,7 +353,7 @@ static void* mi_unix_mmap(void* addr, size_t size, size_t try_alignment, int pro
lflags |= MAP_HUGETLB; lflags |= MAP_HUGETLB;
#endif #endif
#ifdef MAP_HUGE_1GB #ifdef MAP_HUGE_1GB
if ((size % (uintptr_t)1 << 20) == 0) { if ((size % ((uintptr_t)1 << 30)) == 0) {
lflags |= MAP_HUGE_1GB; lflags |= MAP_HUGE_1GB;
} }
else else