diff options
Diffstat (limited to 'llvm/lib/Support/Unix/Memory.inc')
-rw-r--r-- | llvm/lib/Support/Unix/Memory.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/Unix/Memory.inc b/llvm/lib/Support/Unix/Memory.inc index b8f5df5f72e..affdb7e70d9 100644 --- a/llvm/lib/Support/Unix/Memory.inc +++ b/llvm/lib/Support/Unix/Memory.inc @@ -103,7 +103,7 @@ Memory::allocateMappedMemory(size_t NumBytes, // Use any near hint and the page size to set a page-aligned starting address uintptr_t Start = NearBlock ? reinterpret_cast<uintptr_t>(NearBlock->base()) + NearBlock->size() : 0; - static const size_t PageSize = Process::getPageSize(); + static const size_t PageSize = Process::getPageSizeEstimate(); if (Start && Start % PageSize) Start += PageSize - Start % PageSize; @@ -149,7 +149,7 @@ Memory::releaseMappedMemory(MemoryBlock &M) { std::error_code Memory::protectMappedMemory(const MemoryBlock &M, unsigned Flags) { - static const size_t PageSize = Process::getPageSize(); + static const size_t PageSize = Process::getPageSizeEstimate(); if (M.Address == nullptr || M.Size == 0) return std::error_code(); |