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

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: fixed cc tests Created 5 years, 4 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 5071b6cd5f367ffdded29b40407fdda3d7df080a..62a61d5d9df7dcfd8ea65c3c84f7acb3d23b1ffc 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.
@@ -765,6 +773,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.
« runtime/vm/isolate.h ('K') | « runtime/vm/isolate.h ('k') | runtime/vm/isolate_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698