Index: Source/platform/heap/PageMemory.h |
diff --git a/Source/platform/heap/PageMemory.h b/Source/platform/heap/PageMemory.h |
index f81703704d80a94a49723981a85df639b1c18ab3..70f5f4b65e829c3457ea78012f397641fff33bf4 100644 |
--- a/Source/platform/heap/PageMemory.h |
+++ b/Source/platform/heap/PageMemory.h |
@@ -5,6 +5,7 @@ |
#ifndef PageMemory_h |
#define PageMemory_h |
+#include "platform/heap/Heap.h" |
#include "wtf/Assertions.h" |
#include "wtf/PageAllocator.h" |
@@ -203,9 +204,8 @@ public: |
static PageMemory* setupPageMemoryInRegion(PageMemoryRegion* region, size_t pageOffset, size_t payloadSize) |
{ |
- // Setup the payload one OS page into the page memory. The |
- // first os page is the guard page. |
- Address payloadAddress = region->base() + pageOffset + WTF::kSystemPageSize; |
+ // Setup the payload one guard page into the page memory. |
+ Address payloadAddress = region->base() + pageOffset + blinkGuardPageSize; |
return new PageMemory(region, MemoryRegion(payloadAddress, payloadSize)); |
} |
@@ -227,7 +227,7 @@ public: |
// Overallocate by 2 times OS page size to have space for a |
// guard page at the beginning and end of blink heap page. |
- size_t allocationSize = payloadSize + 2 * WTF::kSystemPageSize; |
+ size_t allocationSize = payloadSize + 2 * blinkGuardPageSize; |
PageMemoryRegion* pageMemoryRegion = PageMemoryRegion::allocateLargePage(allocationSize); |
PageMemory* storage = setupPageMemoryInRegion(pageMemoryRegion, 0, payloadSize); |
RELEASE_ASSERT(storage->commit()); |