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

Unified Diff: include/v8.h

Issue 2942543002: [heap] Allow a minimum semi-space size of 512K. (Closed)
Patch Set: kb Created 3 years, 6 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 | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 5789acaec2b716ffb2490793f708999dc016b7b5..687c4f198fccf073353b5dc52b49d3d4caa1472b 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -5961,6 +5961,8 @@ V8_INLINE Local<Boolean> False(Isolate* isolate);
*
* The arguments for set_max_semi_space_size, set_max_old_space_size,
* set_max_executable_size, set_code_range_size specify limits in MB.
+ *
+ * The argument for set_max_semi_space_size_in_kb is in KB.
*/
class V8_EXPORT ResourceConstraints {
public:
@@ -5978,10 +5980,28 @@ class V8_EXPORT ResourceConstraints {
void ConfigureDefaults(uint64_t physical_memory,
uint64_t virtual_memory_limit);
- int max_semi_space_size() const { return max_semi_space_size_; }
- void set_max_semi_space_size(int limit_in_mb) {
- max_semi_space_size_ = limit_in_mb;
+ // Returns the max semi-space size in MB.
+ V8_DEPRECATE_SOON("Use max_semi_space_size_in_kb()",
+ int max_semi_space_size()) {
+ return static_cast<int>(max_semi_space_size_in_kb_ / 1024);
+ }
+
+ // Sets the max semi-space size in MB.
+ V8_DEPRECATE_SOON("Use set_max_semi_space_size_in_kb(size_t limit_in_kb)",
+ void set_max_semi_space_size(int limit_in_mb)) {
+ max_semi_space_size_in_kb_ = limit_in_mb * 1024;
+ }
+
+ // Returns the max semi-space size in KB.
+ size_t max_semi_space_size_in_kb() const {
+ return max_semi_space_size_in_kb_;
}
+
+ // Sets the max semi-space size in KB.
+ void set_max_semi_space_size_in_kb(size_t limit_in_kb) {
+ max_semi_space_size_in_kb_ = limit_in_kb;
+ }
+
int max_old_space_size() const { return max_old_space_size_; }
void set_max_old_space_size(int limit_in_mb) {
max_old_space_size_ = limit_in_mb;
@@ -6007,7 +6027,10 @@ class V8_EXPORT ResourceConstraints {
}
private:
- int max_semi_space_size_;
+ // max_semi_space_size_ is in KB
+ size_t max_semi_space_size_in_kb_;
+
+ // The remaining limits are in MB
int max_old_space_size_;
int max_executable_size_;
uint32_t* stack_limit_;
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698