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

Unified Diff: runtime/vm/isolate.cc

Issue 1263513002: VM: Load allocation-top and -end via Thread. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: arm, arm64 and mips Created 5 years, 5 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
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 070186bb3387eee30abadbefa472121e6b16f647..9309122b4e0912eba3013ff98eb37f2dfed393fc 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -60,6 +60,14 @@ DEFINE_FLAG(charp, isolate_log_filter, NULL,
DEFINE_FLAG(charp, timeline_trace_dir, NULL,
"Enable all timeline trace streams and output traces "
"into specified directory.");
+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, 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");
// TODO(iposva): Make these isolate specific flags inaccessible using the
// regular FLAG_xyz pattern.
@@ -763,6 +771,12 @@ Isolate* Isolate::Init(const char* name_prefix,
ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_INIT);
#undef ISOLATE_TIMELINE_STREAM_INIT
+ Heap::Init(result,
+ is_vm_isolate
+ ? 0 // New gen size 0; VM isolate should only allocate in old.
+ : FLAG_new_gen_semi_max_size * MBInWords,
+ FLAG_old_gen_heap_size * MBInWords,
+ FLAG_external_max_size * MBInWords);
// TODO(5411455): For now just set the recently created isolate as
// the current isolate.

Powered by Google App Engine
This is Rietveld 408576698