Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1172)

Unified Diff: Source/platform/heap/PageMemory.h

Issue 1297873002: Oilpan: Don't use guard pages in NaCl (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/heap/Heap.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « Source/platform/heap/Heap.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698