From 2cf9fc19f22138a012128a832c4a4e97dffdbc2d Mon Sep 17 00:00:00 2001 From: "hpayer@chromium.org" Date: Tue, 8 Jul 2014 11:22:51 +0000 Subject: [PATCH] Make sure that the overflow store buffer size is always larger or equals than the regular store buffer size. BUG= R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/372983005 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22278 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/store-buffer.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/store-buffer.cc b/src/store-buffer.cc index a7575ae32..0e4fd6429 100644 --- a/src/store-buffer.cc +++ b/src/store-buffer.cc @@ -11,6 +11,7 @@ #include "src/base/atomicops.h" #include "src/counters.h" #include "src/store-buffer-inl.h" +#include "src/utils.h" namespace v8 { namespace internal { @@ -51,7 +52,9 @@ void StoreBuffer::SetUp() { // The store buffer may reach this limit during a full garbage collection. // Note that half of the semi-space should be good enough since half of the // memory in the semi-space are not object pointers. - old_store_buffer_length_ = heap_->MaxSemiSpaceSize() / sizeof(Address); + old_store_buffer_length_ = + Max(static_cast(heap_->MaxSemiSpaceSize() / sizeof(Address)), + kOldRegularStoreBufferLength); old_virtual_memory_ = new base::VirtualMemory(old_store_buffer_length_ * kPointerSize); -- 2.34.1