fix large OS page behaviour on Linux; default is now 2 which only uses large OS pages (not huge) through madvise

This commit is contained in:
Daan Leijen 2025-01-03 20:00:40 -08:00
parent 27687718bc
commit 2451b5685c
4 changed files with 16 additions and 12 deletions

View file

@ -80,7 +80,7 @@ typedef struct mi_option_desc_s {
#ifndef MI_DEFAULT_ALLOW_LARGE_OS_PAGES
#if defined(__linux__) && !defined(__ANDROID__)
#define MI_DEFAULT_ALLOW_LARGE_OS_PAGES 1
#define MI_DEFAULT_ALLOW_LARGE_OS_PAGES 2 // enabled, but only use transparent huge pages through madvise
#else
#define MI_DEFAULT_ALLOW_LARGE_OS_PAGES 0
#endif