Disable psset test when hugepage size is too large.

This commit is contained in:
Guangli Dai 2024-12-11 15:24:26 -08:00 committed by Qi Wang
parent a17385a882
commit 587676fee8
3 changed files with 19 additions and 1 deletions

View file

@ -24,6 +24,11 @@ static void hpa_dalloc_batch(tsdn_t *tsdn, pai_t *self,
edata_list_active_t *list, bool *deferred_work_generated);
static uint64_t hpa_time_until_deferred_work(tsdn_t *tsdn, pai_t *self);
bool
hpa_hugepage_size_exceeds_limit() {
return HUGEPAGE > HUGEPAGE_MAX_EXPECTED_SIZE;
}
bool
hpa_supported(void) {
#ifdef _WIN32
@ -52,7 +57,7 @@ hpa_supported(void) {
return false;
}
/* As mentioned in pages.h, do not support If HUGEPAGE is too large. */
if (HUGEPAGE > HUGEPAGE_MAX_EXPECTED_SIZE) {
if (hpa_hugepage_size_exceeds_limit()) {
return false;
}
return true;