| Index: runtime/vm/dart.cc
|
| ===================================================================
|
| --- runtime/vm/dart.cc (revision 35339)
|
| +++ 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);
|
|
|
|
|