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

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

Issue 24261007: Test that we can bootstrap into the first page of each space. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | « no previous file | 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 f3f299cc59ad1fcf22658bff0e8790f840ef379a..a40987da2dc70e4d39cb2588d304ada3b6111b5b 100644
--- a/test/cctest/test-spaces.cc
+++ b/test/cctest/test-spaces.cc
@@ -400,3 +400,24 @@ TEST(LargeObjectSpace) {
CHECK(lo->AllocateRaw(lo_size, NOT_EXECUTABLE)->IsFailure());
}
+
+
+TEST(SizeOfFirstPageIsLargeEnough) {
+ CcTest::InitializeVM();
+ Isolate* isolate = CcTest::i_isolate();
+
+ // Freshly initialized VM gets by with one page per space.
+ for (int i = FIRST_PAGED_SPACE; i <= LAST_PAGED_SPACE; i++) {
+ CHECK_EQ(1, isolate->heap()->paged_space(i)->CountTotalPages());
+ }
+
+ // Executing the empty script gets by with one page per space.
+ HandleScope scope(isolate);
+ CompileRun("/*empty*/");
+ for (int i = FIRST_PAGED_SPACE; i <= LAST_PAGED_SPACE; i++) {
+ CHECK_EQ(1, isolate->heap()->paged_space(i)->CountTotalPages());
+ }
+
+ // No large objects required to perform the above steps.
+ CHECK(isolate->heap()->lo_space()->IsEmpty());
+}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698