summaryrefslogtreecommitdiff
path: root/deps/v8/test/unittests/heap/spaces-unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/unittests/heap/spaces-unittest.cc')
-rw-r--r--deps/v8/test/unittests/heap/spaces-unittest.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/deps/v8/test/unittests/heap/spaces-unittest.cc b/deps/v8/test/unittests/heap/spaces-unittest.cc
index bdd9933398..9b4b2675e3 100644
--- a/deps/v8/test/unittests/heap/spaces-unittest.cc
+++ b/deps/v8/test/unittests/heap/spaces-unittest.cc
@@ -22,6 +22,12 @@ TEST_F(SpacesTest, CompactionSpaceMerge) {
EXPECT_TRUE(compaction_space != NULL);
EXPECT_TRUE(compaction_space->SetUp());
+ for (Page* p : *old_space) {
+ // Unlink free lists from the main space to avoid reusing the memory for
+ // compaction spaces.
+ old_space->UnlinkFreeListCategories(p);
+ }
+
// Cannot loop until "Available()" since we initially have 0 bytes available
// and would thus neither grow, nor be able to allocate an object.
const int kNumObjects = 10;