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

Unified Diff: src/api.cc

Issue 262653002: When maximum space size flags are set, overwrite the resource constraints. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index ab4ded2472971ea519ba412b40c16bfc39804ad1..7adf987692eaff1b01f151f03e1812aed3a8680e 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -461,6 +461,17 @@ void ResourceConstraints::ConfigureDefaults(uint64_t physical_memory,
set_max_available_threads(i::Max(i::Min(number_of_processors, 4u), 1u));
+ if (i::FLAG_max_new_space_size > 0) {
+ set_max_new_space_size(i::FLAG_max_new_space_size * i::Heap::kLumpOfMemory);
+ }
+ if (i::FLAG_max_old_space_size > 0) {
+ set_max_old_space_size(i::FLAG_max_old_space_size * i::Heap::kLumpOfMemory);
+ }
+ if (i::FLAG_max_executable_size > 0) {
+ set_max_executable_size(
+ i::FLAG_max_executable_size * i::Heap::kLumpOfMemory);
+ }
+
rmcilroy 2014/04/30 12:17:13 Would it be better to put this code in Heap::Confi
Hannes Payer (out of office) 2014/04/30 12:36:22 Yeah, makes sense. Done.
if (virtual_memory_limit > 0 && i::kIs64BitArch) {
// Reserve no more than 1/8 of the memory for the code range, but at most
// 512 MB.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698