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

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

Issue 2311203002: Move kMaxRegularHeapObjectSize into globals (Closed)
Patch Set: Saving the file helps... Created 4 years, 3 months 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/heap/test-mark-compact.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/heap/test-spaces.cc
diff --git a/test/cctest/heap/test-spaces.cc b/test/cctest/heap/test-spaces.cc
index f485e7ffef9372f5ad5f3a1909808339e71afdb3..8eecc47b53e6a365e621541c7d8f535adadba1a8 100644
--- a/test/cctest/heap/test-spaces.cc
+++ b/test/cctest/heap/test-spaces.cc
@@ -367,10 +367,9 @@ TEST(NewSpace) {
CcTest::heap()->InitialSemiSpaceSize()));
CHECK(new_space.HasBeenSetUp());
- while (new_space.Available() >= Page::kMaxRegularHeapObjectSize) {
- Object* obj =
- new_space.AllocateRawUnaligned(Page::kMaxRegularHeapObjectSize)
- .ToObjectChecked();
+ while (new_space.Available() >= kMaxRegularHeapObjectSize) {
+ Object* obj = new_space.AllocateRawUnaligned(kMaxRegularHeapObjectSize)
+ .ToObjectChecked();
CHECK(new_space.Contains(HeapObject::cast(obj)));
}
@@ -394,7 +393,7 @@ TEST(OldSpace) {
CHECK(s->SetUp());
while (s->Available() > 0) {
- s->AllocateRawUnaligned(Page::kMaxRegularHeapObjectSize).ToObjectChecked();
+ s->AllocateRawUnaligned(kMaxRegularHeapObjectSize).ToObjectChecked();
}
delete s;
@@ -425,11 +424,11 @@ TEST(CompactionSpace) {
// and would thus neither grow, nor be able to allocate an object.
const int kNumObjects = 100;
const int kNumObjectsPerPage =
- compaction_space->AreaSize() / Page::kMaxRegularHeapObjectSize;
+ compaction_space->AreaSize() / kMaxRegularHeapObjectSize;
const int kExpectedPages =
(kNumObjects + kNumObjectsPerPage - 1) / kNumObjectsPerPage;
for (int i = 0; i < kNumObjects; i++) {
- compaction_space->AllocateRawUnaligned(Page::kMaxRegularHeapObjectSize)
+ compaction_space->AllocateRawUnaligned(kMaxRegularHeapObjectSize)
.ToObjectChecked();
}
int pages_in_old_space = old_space->CountTotalPages();
« no previous file with comments | « test/cctest/heap/test-mark-compact.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698