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

Unified Diff: vm/heap.cc

Issue 8423023: Add command line options to specify the various heap size parameters. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 years, 2 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 | « vm/heap.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/heap.cc
===================================================================
--- vm/heap.cc (revision 1042)
+++ vm/heap.cc (working copy)
@@ -19,11 +19,21 @@
DEFINE_FLAG(bool, verbose_gc, false, "Enables verbose GC.");
DEFINE_FLAG(bool, gc_at_alloc, false, "GC at every allocation.");
+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");
+DEFINE_FLAG(int, code_heap_size, Heap::kCodeHeapSizeInMB,
+ "code heap size in MB,"
+ "e.g: --code_heap_size=8 allocates a 8MB old gen heap");
Heap::Heap() {
- new_space_ = new Scavenger(this, 32 * MB, kNewObjectAlignmentOffset);
- old_space_ = new PageSpace(this, kHeapSize);
- code_space_ = new PageSpace(this, kCodeHeapSize, true);
+ new_space_ = new Scavenger(this,
+ (FLAG_new_gen_heap_size * MB),
+ kNewObjectAlignmentOffset);
+ old_space_ = new PageSpace(this, (FLAG_old_gen_heap_size * MB));
+ code_space_ = new PageSpace(this, (FLAG_code_heap_size * MB), true);
}
« no previous file with comments | « vm/heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698