Revision: 16863
Author: [email protected]
Date: Fri Sep 20 12:18:17 2013 UTC
Log: Test that we can bootstrap into the first page of each space.
[email protected]
TEST=cctest/test-spaces/SizeOfFirstPageIsLargeEnough
Review URL: https://codereview.chromium.org/24261007
http://code.google.com/p/v8/source/detail?r=16863
Modified:
/branches/bleeding_edge/test/cctest/test-spaces.cc
=======================================
--- /branches/bleeding_edge/test/cctest/test-spaces.cc Thu Sep 19 09:46:15
2013 UTC
+++ /branches/bleeding_edge/test/cctest/test-spaces.cc Fri Sep 20 12:18:17
2013 UTC
@@ -400,3 +400,25 @@
CHECK(lo->AllocateRaw(lo_size, NOT_EXECUTABLE)->IsFailure());
}
+
+
+TEST(SizeOfFirstPageIsLargeEnough) {
+ if (i::FLAG_always_opt) return;
+ 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());
+}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.