Make sure that the overflow store buffer size is always larger or equals than the...
authorhpayer@chromium.org <hpayer@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 8 Jul 2014 11:22:51 +0000 (11:22 +0000)
committerhpayer@chromium.org <hpayer@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 8 Jul 2014 11:22:51 +0000 (11:22 +0000)
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

index a7575ae..0e4fd64 100644 (file)
@@ -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<int>(heap_->MaxSemiSpaceSize() / sizeof(Address)),
+          kOldRegularStoreBufferLength);
 
   old_virtual_memory_ =
       new base::VirtualMemory(old_store_buffer_length_ * kPointerSize);