summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/allocator.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/allocator.cpp b/tests/allocator.cpp
index 8ca0963..a43e14a 100644
--- a/tests/allocator.cpp
+++ b/tests/allocator.cpp
@@ -80,7 +80,9 @@ namespace
void* allocate_page_aligned(size_t size)
{
- return mmap(0, size + page_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
+ void* result = malloc(size + page_size);
+
+ return reinterpret_cast<void*>(align_to_page(reinterpret_cast<size_t>(result)));
}
void* allocate(size_t size)