Chromium Code Reviews| Index: Source/platform/heap/PageMemory.h |
| diff --git a/Source/platform/heap/PageMemory.h b/Source/platform/heap/PageMemory.h |
| index f81703704d80a94a49723981a85df639b1c18ab3..70465b2dff38fc8c061b9ea4ea0dab4ef581f300 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" |
| @@ -205,7 +206,7 @@ public: |
| { |
| // Setup the payload one OS page into the page memory. The |
|
sof
2015/08/16 16:41:56
nit: could you adjust the comment a bit to reflect
|
| // first os page is the guard page. |
| - Address payloadAddress = region->base() + pageOffset + WTF::kSystemPageSize; |
| + Address payloadAddress = region->base() + pageOffset + blinkGuardPageSize; |
| return new PageMemory(region, MemoryRegion(payloadAddress, payloadSize)); |
| } |
| @@ -227,7 +228,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()); |