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

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

Issue 7619: - Removed a few indirections by making the two SemiSpaces... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 2 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
« src/spaces.cc ('K') | « src/spaces-inl.h ('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
===================================================================
--- test/cctest/test-spaces.cc (revision 516)
+++ test/cctest/test-spaces.cc (working copy)
@@ -157,27 +157,23 @@
CHECK(Heap::ConfigureHeapDefault());
CHECK(MemoryAllocator::Setup(Heap::MaxCapacity()));
- NewSpace* s = new NewSpace(Heap::InitialSemiSpaceSize(),
- Heap::SemiSpaceSize(),
- NEW_SPACE);
- CHECK(s != NULL);
+ NewSpace new_space;
void* chunk =
MemoryAllocator::ReserveInitialChunk(2 * Heap::YoungGenerationSize());
CHECK(chunk != NULL);
Address start = RoundUp(static_cast<Address>(chunk),
Heap::YoungGenerationSize());
- CHECK(s->Setup(start, Heap::YoungGenerationSize()));
- CHECK(s->HasBeenSetup());
+ CHECK(new_space.Setup(start, Heap::YoungGenerationSize()));
+ CHECK(new_space.HasBeenSetup());
- while (s->Available() >= Page::kMaxHeapObjectSize) {
- Object* obj = s->AllocateRaw(Page::kMaxHeapObjectSize);
+ while (new_space.Available() >= Page::kMaxHeapObjectSize) {
+ Object* obj = new_space.AllocateRaw(Page::kMaxHeapObjectSize);
CHECK(!obj->IsFailure());
- CHECK(s->Contains(HeapObject::cast(obj)));
+ CHECK(new_space.Contains(HeapObject::cast(obj)));
}
- s->TearDown();
- delete s;
+ new_space.TearDown();
MemoryAllocator::TearDown();
}
« src/spaces.cc ('K') | « src/spaces-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698