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

Unified Diff: src/spaces.h

Issue 7352007: Add guard pages in front of platform allocations (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: '' Created 9 years, 5 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 | « src/platform-win32.cc ('k') | src/spaces.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces.h
===================================================================
--- src/spaces.h (revision 8619)
+++ src/spaces.h (working copy)
@@ -662,18 +662,26 @@
// If a chunk has at least 16 pages, the maximum heap size is about
// 8K * 8K * 16 = 1G bytes.
#ifdef V8_TARGET_ARCH_X64
- static const int kPagesPerChunk = 32;
+#ifdef ENABLE_HEAP_PROTECTION
+ static const int kPagesPerChunk = 31;
+#else // ENABLE_HEAP_PROTECTION
+ static const int kPagesPerChunk = 32;
+#endif // ENABLE_HEAP_PROTECTION
// On 64 bit the chunk table consists of 4 levels of 4096-entry tables.
static const int kPagesPerChunkLog2 = 5;
static const int kChunkTableLevels = 4;
static const int kChunkTableBitsPerLevel = 12;
#else
- static const int kPagesPerChunk = 16;
+#ifdef ENABLE_HEAP_PROTECTION
+ static const int kPagesPerChunk = 15;
+#else // ENABLE_HEAP_PROTECTION
+ static const int kPagesPerChunk = 16;
+#endif // ENABLE_HEAP_PROTECTION
// On 32 bit the chunk table consists of 2 levels of 256-entry tables.
static const int kPagesPerChunkLog2 = 4;
static const int kChunkTableLevels = 2;
static const int kChunkTableBitsPerLevel = 8;
-#endif
+#endif // V8_TARGET_ARCH_X64
private:
MemoryAllocator();
« no previous file with comments | « src/platform-win32.cc ('k') | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698