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

Unified Diff: src/api.cc

Issue 68203029: Make number of available threads isolate-dependent and expose it to ResourceConstraints. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address comments Created 7 years, 1 month 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 | « include/v8.h ('k') | src/compiler.h » ('j') | 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 736f0b00d7ac833ca3409ebd703a90f8ef49a5bc..7966e2c57c95d0a987db6c15f302e3417ae22895 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -563,7 +563,8 @@ ResourceConstraints::ResourceConstraints()
: max_young_space_size_(0),
max_old_space_size_(0),
max_executable_size_(0),
- stack_limit_(NULL) { }
+ stack_limit_(NULL),
+ max_available_threads_(0) { }
void ResourceConstraints::ConfigureDefaults(uint64_t physical_memory) {
@@ -599,6 +600,8 @@ void ResourceConstraints::ConfigureDefaults(uint64_t physical_memory) {
set_max_old_space_size(700 * lump_of_memory);
set_max_executable_size(256 * lump_of_memory);
}
+
+ set_max_available_threads(0);
}
@@ -627,6 +630,8 @@ bool SetResourceConstraints(Isolate* v8_isolate,
uintptr_t limit = reinterpret_cast<uintptr_t>(constraints->stack_limit());
isolate->stack_guard()->SetStackLimit(limit);
}
+
+ isolate->set_max_available_threads(constraints->max_available_threads());
return true;
}
« no previous file with comments | « include/v8.h ('k') | src/compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698