Do not support hpa if HUGEPAGE is too large.

This commit is contained in:
Guangli Dai 2024-09-26 15:40:52 -07:00 committed by Qi Wang
parent 4f4fd42447
commit 1c900088c3
1 changed files with 4 additions and 0 deletions

View File

@ -51,6 +51,10 @@ hpa_supported(void) {
if (HUGEPAGE_PAGES == 1) {
return false;
}
/* As mentioned in pages.h, do not support If HUGEPAGE is too large. */
if (HUGEPAGE > HUGEPAGE_MAX_EXPECTED_SIZE) {
return false;
}
return true;
}