From 94a3009b04b7b87622721282ad02ca5f707db0f1 Mon Sep 17 00:00:00 2001 From: "ager@chromium.org" Date: Thu, 20 Aug 2009 08:12:30 +0000 Subject: [PATCH] Go back to doubling the size when growing new space. Our memory tests show little improvement by only growing by 50%. Review URL: http://codereview.chromium.org/174133 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/spaces.cc | 4 ++-- src/v8.cc | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/spaces.cc b/src/spaces.cc index 9227a87f3..337f0143b 100644 --- a/src/spaces.cc +++ b/src/spaces.cc @@ -1079,9 +1079,9 @@ void SemiSpace::TearDown() { bool SemiSpace::Grow() { - // Commit 50% extra space but only up to maximum capacity. + // Double the semispace size but only up to maximum capacity. int maximum_extra = maximum_capacity_ - capacity_; - int extra = Min(RoundUp(capacity_ / 2, OS::AllocateAlignment()), + int extra = Min(RoundUp(capacity_, OS::AllocateAlignment()), maximum_extra); if (!MemoryAllocator::CommitBlock(high(), extra, executable())) { return false; diff --git a/src/v8.cc b/src/v8.cc index 00e0e6e6d..faec986d3 100644 --- a/src/v8.cc +++ b/src/v8.cc @@ -156,6 +156,7 @@ uint32_t V8::Random() { return (hi << 16) + (lo & 0xFFFF); } + void V8::IdleNotification(bool is_high_priority) { if (!FLAG_use_idle_notification) return; // Ignore high priority instances of V8. -- 2.34.1