Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(572)

Unified Diff: test/cctest/test-heap.cc

Issue 1440293003: Version 4.8.271.3 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.8
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/cctest.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-heap.cc
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
index b6cd09b5c487fcdd827840a9cbd9d7447ff08243..41e6c24b9f0331c24a5b86599ba6bdc409655588 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -4576,8 +4576,9 @@ TEST(LargeObjectSlotRecording) {
FixedArray* old_location = *lit;
// Allocate a large object.
- const int kSize = 1000000;
- Handle<FixedArray> lo = isolate->factory()->NewFixedArray(kSize, TENURED);
+ int size = Max(1000000, Page::kMaxRegularHeapObjectSize + KB);
+ CHECK(size > Page::kMaxRegularHeapObjectSize);
+ Handle<FixedArray> lo = isolate->factory()->NewFixedArray(size, TENURED);
CHECK(heap->lo_space()->Contains(*lo));
// Start incremental marking to active write barrier.
@@ -4587,8 +4588,8 @@ TEST(LargeObjectSlotRecording) {
// Create references from the large object to the object on the evacuation
// candidate.
- const int kStep = kSize / 10;
- for (int i = 0; i < kSize; i += kStep) {
+ const int kStep = size / 10;
+ for (int i = 0; i < size; i += kStep) {
lo->set(i, *lit);
CHECK(lo->get(i) == old_location);
}
@@ -4597,7 +4598,7 @@ TEST(LargeObjectSlotRecording) {
CcTest::heap()->CollectAllGarbage();
// Verify that the pointers in the large object got updated.
- for (int i = 0; i < kSize; i += kStep) {
+ for (int i = 0; i < size; i += kStep) {
CHECK_EQ(lo->get(i), *lit);
CHECK(lo->get(i) != old_location);
}
« no previous file with comments | « test/cctest/cctest.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698