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

Unified Diff: vm/heap_test.cc

Issue 8996011: - Trigger old-gen GCs when needed. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 years 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 | « vm/heap.cc ('k') | vm/pages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/heap_test.cc
===================================================================
--- vm/heap_test.cc (revision 2587)
+++ vm/heap_test.cc (working copy)
@@ -17,6 +17,7 @@
" return [1, 2, 3];\n"
" }\n"
"}\n";
+ FLAG_verbose_gc = true;
Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
Dart_Handle result = Dart_InvokeStatic(lib,
Dart_NewString("HeapTester"),
@@ -30,5 +31,32 @@
Heap* heap = isolate->heap();
heap->CollectGarbage(Heap::kOld);
}
+
+
+TEST_CASE(LargeSweep) {
+ const char* kScriptChars =
+ "class HeapTester {\n"
+ " static void main() {\n"
+ " return new List(8 * 1024 * 1024);\n"
+ " }\n"
+ "}\n";
+ FLAG_verbose_gc = true;
+ Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
+ Dart_EnterScope();
+ Dart_Handle result = Dart_InvokeStatic(lib,
+ Dart_NewString("HeapTester"),
+ Dart_NewString("main"),
+ 0, NULL);
+
+ EXPECT_VALID(result);
+ EXPECT(!Dart_IsNull(result));
+ EXPECT(Dart_IsList(result));
+ Isolate* isolate = Isolate::Current();
+ Heap* heap = isolate->heap();
+ heap->CollectGarbage(Heap::kOld);
+ Dart_ExitScope();
+ heap->CollectGarbage(Heap::kOld);
+}
+
#endif // TARGET_ARCH_IA32
}
« no previous file with comments | « vm/heap.cc ('k') | vm/pages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698