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

Unified Diff: runtime/vm/dart.cc

Issue 259483002: Zero-sized new-space for VM isolate. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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 | runtime/vm/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart.cc
===================================================================
--- runtime/vm/dart.cc (revision 35383)
+++ runtime/vm/dart.cc (working copy)
@@ -30,6 +30,12 @@
namespace dart {
+DEFINE_FLAG(int, new_gen_heap_size, 32, "new gen heap size in MB,"
+ "e.g: --new_gen_heap_size=64 allocates a 64MB new gen heap");
+DEFINE_FLAG(int, old_gen_heap_size, Heap::kHeapSizeInMB,
+ "old gen heap size in MB,"
+ "e.g: --old_gen_heap_size=1024 allocates a 1024MB old gen heap");
+
DECLARE_FLAG(bool, print_class_table);
DECLARE_FLAG(bool, trace_isolates);
@@ -117,7 +123,9 @@
vm_isolate_ = Isolate::Init("vm-isolate");
StackZone zone(vm_isolate_);
HandleScope handle_scope(vm_isolate_);
- Heap::Init(vm_isolate_);
+ Heap::Init(vm_isolate_,
+ 0, // New gen size 0; VM isolate should only allocate in old.
+ FLAG_old_gen_heap_size * MBInWords);
ObjectStore::Init(vm_isolate_);
TargetCPUFeatures::InitOnce();
Object::InitOnce();
@@ -203,7 +211,9 @@
ASSERT(isolate != NULL);
StackZone zone(isolate);
HandleScope handle_scope(isolate);
- Heap::Init(isolate);
+ Heap::Init(isolate,
+ FLAG_new_gen_heap_size * MBInWords,
+ FLAG_old_gen_heap_size * MBInWords);
ObjectIdRing::Init(isolate);
ObjectStore::Init(isolate);
« no previous file with comments | « no previous file | runtime/vm/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698