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

Unified Diff: runtime/vm/dart.cc

Issue 864843002: Remove default heap size limit and add separate limit for externals. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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/dart_api_impl_test.cc » ('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 43108)
+++ runtime/vm/dart.cc (working copy)
@@ -34,10 +34,14 @@
DEFINE_FLAG(int, new_gen_semi_max_size, (kWordSize <= 4) ? 16 : 32,
"Max size of new gen semi space in MB");
-DEFINE_FLAG(int, old_gen_heap_size, Heap::kHeapSizeInMB,
- "Max size of old gen heap size in MB,"
+DEFINE_FLAG(int, old_gen_heap_size, 0,
+ "Max size of old gen heap size in MB, or 0 for unlimited,"
"e.g: --old_gen_heap_size=1024 allows up to 1024MB old gen heap");
+DEFINE_FLAG(int, external_max_size, (kWordSize <= 4) ? 512 : 1024,
+ "Max total size of external allocations in MB, or 0 for unlimited,"
+ "e.g: --external_max_size=1024 allows up to 1024MB of externals");
+
DECLARE_FLAG(bool, print_class_table);
DECLARE_FLAG(bool, trace_isolates);
@@ -114,7 +118,8 @@
HandleScope handle_scope(vm_isolate_);
Heap::Init(vm_isolate_,
0, // New gen size 0; VM isolate should only allocate in old.
- FLAG_old_gen_heap_size * MBInWords);
+ FLAG_old_gen_heap_size * MBInWords,
+ FLAG_external_max_size * MBInWords);
ObjectStore::Init(vm_isolate_);
TargetCPUFeatures::InitOnce();
Object::InitOnce(vm_isolate_);
@@ -197,7 +202,8 @@
HandleScope handle_scope(isolate);
Heap::Init(isolate,
FLAG_new_gen_semi_max_size * MBInWords,
- FLAG_old_gen_heap_size * MBInWords);
+ FLAG_old_gen_heap_size * MBInWords,
+ FLAG_external_max_size * MBInWords);
ObjectIdRing::Init(isolate);
ObjectStore::Init(isolate);
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698