Refactor init_system_thp_mode and print it in malloc stats.

This commit is contained in:
guangli-dai 2025-10-07 16:18:07 -07:00 committed by Guangli Dai
parent 87555dfbb2
commit 2cfa41913e
6 changed files with 63 additions and 22 deletions

View file

@ -28,8 +28,8 @@ const char *const metadata_thp_mode_names[] = {"disabled", "auto", "always"};
static inline bool
metadata_thp_madvise(void) {
return (metadata_thp_enabled()
&& (init_system_thp_mode == thp_mode_default));
return (metadata_thp_enabled() &&
(init_system_thp_mode == system_thp_mode_madvise));
}
static void *