Fix test/unit/pages.
As part of the metadata_thp support, We now have a separate swtich (JEMALLOC_HAVE_MADVISE_HUGE) for MADV_HUGEPAGE availability. Use that instead of JEMALLOC_THP (which doesn't guard pages_huge anymore) in tests.
This commit is contained in:
13
src/pages.c
13
src/pages.c
@@ -417,13 +417,14 @@ os_overcommits_proc(void) {
|
||||
|
||||
static void
|
||||
init_thp_state(void) {
|
||||
#ifndef JEMALLOC_HAVE_MADVISE_HUGE
|
||||
if (opt_metadata_thp && opt_abort) {
|
||||
malloc_write("<jemalloc>: no MADV_HUGEPAGE support\n");
|
||||
abort();
|
||||
if (!have_madvise_huge) {
|
||||
if (opt_metadata_thp && opt_abort) {
|
||||
malloc_write("<jemalloc>: no MADV_HUGEPAGE support\n");
|
||||
abort();
|
||||
}
|
||||
goto label_error;
|
||||
}
|
||||
goto label_error;
|
||||
#endif
|
||||
|
||||
static const char madvise_state[] = "always [madvise] never\n";
|
||||
char buf[sizeof(madvise_state)];
|
||||
|
||||
|
Reference in New Issue
Block a user