Support --with-lg-page values larger than system page size.
All mappings continue to be PAGE-aligned, even if the system page size is smaller. This change is primarily intended to provide a mechanism for supporting multiple page sizes with the same binary; smaller page sizes work better in conjunction with jemalloc's design. This resolves #467.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
#if LG_PAGE <= 14
|
||||
#define SZ (ZU(1) << (LG_PAGE - 2))
|
||||
#else
|
||||
#define SZ 4096
|
||||
#define SZ ZU(4096)
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@@ -7,7 +7,7 @@ TEST_BEGIN(test_pages_huge) {
|
||||
|
||||
alloc_size = HUGEPAGE * 2 - PAGE;
|
||||
commit = true;
|
||||
pages = pages_map(NULL, alloc_size, &commit);
|
||||
pages = pages_map(NULL, alloc_size, PAGE, &commit);
|
||||
assert_ptr_not_null(pages, "Unexpected pages_map() error");
|
||||
|
||||
hugepage = (void *)(ALIGNMENT_CEILING((uintptr_t)pages, HUGEPAGE));
|
||||
|
Reference in New Issue
Block a user