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

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

Issue 1138643005: Clean-up aligned allocation logic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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/test-heap.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-spaces.cc
diff --git a/test/cctest/test-spaces.cc b/test/cctest/test-spaces.cc
index 9d223278319229d8cc8308843aaeb35084c81a77..848c72b6a9e1cf0932c87ce1f134cd1d191449f1 100644
--- a/test/cctest/test-spaces.cc
+++ b/test/cctest/test-spaces.cc
@@ -358,8 +358,9 @@ TEST(NewSpace) {
CHECK(new_space.HasBeenSetUp());
while (new_space.Available() >= Page::kMaxRegularHeapObjectSize) {
- Object* obj = new_space.AllocateRaw(
- Page::kMaxRegularHeapObjectSize).ToObjectChecked();
+ Object* obj =
+ new_space.AllocateRawUnaligned(Page::kMaxRegularHeapObjectSize)
+ .ToObjectChecked();
CHECK(new_space.Contains(HeapObject::cast(obj)));
}
@@ -384,7 +385,7 @@ TEST(OldSpace) {
CHECK(s->SetUp());
while (s->Available() > 0) {
- s->AllocateRaw(Page::kMaxRegularHeapObjectSize).ToObjectChecked();
+ s->AllocateRawUnaligned(Page::kMaxRegularHeapObjectSize).ToObjectChecked();
}
s->TearDown();
@@ -485,7 +486,8 @@ UNINITIALIZED_TEST(NewSpaceGrowsToTargetCapacity) {
// Try to allocate out of the new space. A new page should be added and
// the
// allocation should succeed.
- v8::internal::AllocationResult allocation = new_space->AllocateRaw(80);
+ v8::internal::AllocationResult allocation =
+ new_space->AllocateRawUnaligned(80);
CHECK(!allocation.IsRetry());
CHECK(new_space->CommittedMemory() == 2 * Page::kPageSize);
« no previous file with comments | « test/cctest/test-heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698