aboutsummaryrefslogtreecommitdiff
path: root/tests/get_hugepage_region.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/get_hugepage_region.c')
-rw-r--r--tests/get_hugepage_region.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/get_hugepage_region.c b/tests/get_hugepage_region.c
index 2fb5b23..292d201 100644
--- a/tests/get_hugepage_region.c
+++ b/tests/get_hugepage_region.c
@@ -45,8 +45,10 @@ void free_and_confirm_region_free(void *p, int line) {
int test_unaligned_addr_huge(void *p)
{
+ unsigned long long mapping_size;
p = (void *)((unsigned long)p & ~((gethugepagesize()) - 1));
- return test_addr_huge(p);
+ mapping_size = get_mapping_page_size(p);
+ return (mapping_size == hpage_size);
}
#define TESTLEN ((num_hugepages - 1) * hpage_size + hpage_size / 2)