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

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

Issue 2311963002: [heap,snapshot] Replace first page size from snapshots with page trimming (Closed)
Patch Set: Remove debugging print 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/heap-utils.cc ('k') | test/cctest/heap/test-spaces.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/heap/test-heap.cc
diff --git a/test/cctest/heap/test-heap.cc b/test/cctest/heap/test-heap.cc
index e559ae41adb1710fe079bfdf673f707d71fb3ba0..e54724c1cbcb1d4201ed72a3bc40e7b595ed6f2b 100644
--- a/test/cctest/heap/test-heap.cc
+++ b/test/cctest/heap/test-heap.cc
@@ -2218,6 +2218,18 @@ static Address AlignOldSpace(AllocationAlignment alignment, int offset) {
// Test the case where allocation must be done from the free list, so filler
// may precede or follow the object.
TEST(TestAlignedOverAllocation) {
+ Heap* heap = CcTest::heap();
+ // Test checks for fillers before and behind objects and requires a fresh
+ // page and empty free list.
+ heap::AbandonCurrentlyFreeMemory(heap->old_space());
+ // Allocate a dummy object to properly set up the linear allocation info.
+ AllocationResult dummy =
+ heap->old_space()->AllocateRawUnaligned(kPointerSize);
+ CHECK(!dummy.IsRetry());
+ heap->CreateFillerObjectAt(
+ HeapObject::cast(dummy.ToObjectChecked())->address(), kPointerSize,
+ ClearRecordedSlots::kNo);
+
// Double misalignment is 4 on 32-bit platforms, 0 on 64-bit ones.
const intptr_t double_misalignment = kDoubleSize - kPointerSize;
Address start;
« no previous file with comments | « test/cctest/heap/heap-utils.cc ('k') | test/cctest/heap/test-spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698