Revision: 11456
Author: [email protected]
Date: Thu Apr 26 07:45:58 2012
Log: Fix spurious bugs in GrowAndShrinkNewSpace when the
min and max new space sizes are equal.
Review URL: https://chromiumcodereview.appspot.com/10241002
http://code.google.com/p/v8/source/detail?r=11456
Modified:
/branches/bleeding_edge/test/cctest/test-heap.cc
=======================================
--- /branches/bleeding_edge/test/cctest/test-heap.cc Thu Apr 5 09:40:13
2012
+++ /branches/bleeding_edge/test/cctest/test-heap.cc Thu Apr 26 07:45:58
2012
@@ -1275,6 +1275,13 @@
InitializeVM();
NewSpace* new_space = HEAP->new_space();
+ if (HEAP->ReservedSemiSpaceSize() == HEAP->InitialSemiSpaceSize()) {
+ // The max size cannot exceed the reserved size, since semispaces must
be
+ // always within the reserved space. We can't test new space growing
and
+ // shrinking if the reserved size is the same as the minimum (initial)
size.
+ return;
+ }
+
// Explicitly growing should double the space capacity.
intptr_t old_capacity, new_capacity;
old_capacity = new_space->Capacity();
@@ -1315,6 +1322,14 @@
TEST(CollectingAllAvailableGarbageShrinksNewSpace) {
InitializeVM();
+
+ if (HEAP->ReservedSemiSpaceSize() == HEAP->InitialSemiSpaceSize()) {
+ // The max size cannot exceed the reserved size, since semispaces must
be
+ // always within the reserved space. We can't test new space growing
and
+ // shrinking if the reserved size is the same as the minimum (initial)
size.
+ return;
+ }
+
v8::HandleScope scope;
NewSpace* new_space = HEAP->new_space();
intptr_t old_capacity, new_capacity;
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev