mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 17:17:19 +03:00
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:
parent
8fdd9a5797
commit
3ec279ba1c
3 changed files with 15 additions and 7 deletions
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)];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue