From 84c2072c56475641d0315ab40d319f7791eb93ab Mon Sep 17 00:00:00 2001 From: "ager@chromium.org" Date: Wed, 9 Sep 2009 10:56:13 +0000 Subject: [PATCH] Reduce the chunk size from 64 pages to 16 pages per chunk. This reduces the initial V8 memory usage by roughly 2MB. Review URL: http://codereview.chromium.org/194054 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2856 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/spaces.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/spaces.h b/src/spaces.h index 98663db..1ead2a3 100644 --- a/src/spaces.h +++ b/src/spaces.h @@ -445,13 +445,9 @@ class MemoryAllocator : public AllStatic { // Due to encoding limitation, we can only have 8K chunks. static const int kMaxNofChunks = 1 << Page::kPageSizeBits; - // If a chunk has at least 32 pages, the maximum heap size is about - // 8 * 1024 * 32 * 8K = 2G bytes. -#if defined(ANDROID) + // If a chunk has at least 16 pages, the maximum heap size is about + // 8k * 8K * 16 = 1G bytes. static const int kPagesPerChunk = 16; -#else - static const int kPagesPerChunk = 64; -#endif static const int kChunkSize = kPagesPerChunk * Page::kPageSize; private: -- 2.7.4