From 0918c8c119852ea6a8ca203da0ca5f56202eab10 Mon Sep 17 00:00:00 2001 From: hpayer Date: Tue, 17 Feb 2015 06:00:13 -0800 Subject: [PATCH] Start with a more conservative initial old generation size. BUG= Review URL: https://codereview.chromium.org/934803002 Cr-Commit-Position: refs/heads/master@{#26692} --- src/heap/heap.cc | 6 ++++-- src/heap/heap.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/heap/heap.cc b/src/heap/heap.cc index 8ff27dc32a..d4cd78ebda 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc @@ -67,7 +67,8 @@ Heap::Heap() initial_semispace_size_(Page::kPageSize), target_semispace_size_(Page::kPageSize), max_old_generation_size_(700ul * (kPointerSize / 4) * MB), - initial_old_generation_size_(max_old_generation_size_), + initial_old_generation_size_(max_old_generation_size_ / + kInitalOldGenerationLimitFactor), old_generation_size_configured_(false), max_executable_size_(256ul * (kPointerSize / 4) * MB), // Variables set based on semispace_size_ and old_generation_size_ in @@ -5281,7 +5282,8 @@ bool Heap::ConfigureHeap(int max_semi_space_size, int max_old_space_size, if (FLAG_initial_old_space_size > 0) { initial_old_generation_size_ = FLAG_initial_old_space_size * MB; } else { - initial_old_generation_size_ = max_old_generation_size_ / 2; + initial_old_generation_size_ = + max_old_generation_size_ / kInitalOldGenerationLimitFactor; } old_generation_allocation_limit_ = initial_old_generation_size_; diff --git a/src/heap/heap.h b/src/heap/heap.h index 15eb0820f0..23d634001b 100644 --- a/src/heap/heap.h +++ b/src/heap/heap.h @@ -1084,6 +1084,8 @@ class Heap { static const intptr_t kMinimumOldGenerationAllocationLimit = 8 * (Page::kPageSize > MB ? Page::kPageSize : MB); + static const int kInitalOldGenerationLimitFactor = 7; + static const int kPointerMultiplier = i::kPointerSize / 4; // The new space size has to be a power of 2. Sizes are in MB.