Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index 5789acaec2b716ffb2490793f708999dc016b7b5..87f6293514809944b7dfe3f7c99ccdd8637eabad 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,22 @@ 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_; } |
+ // Returns the max semi-space size in MB. |
+ int max_semi_space_size() const { return max_semi_space_size_in_kb_ / 1024; } |
Michael Lippautz
2017/06/14 07:25:08
Maybe deprecate?
Hannes Payer (out of office)
2017/06/14 07:57:02
Done.
|
+ |
+ // Sets the max semi-space size in MB. |
void set_max_semi_space_size(int limit_in_mb) { |
- max_semi_space_size_ = limit_in_mb; |
+ max_semi_space_size_in_kb_ = limit_in_mb * 1024; |
} |
+ |
+ // Returns the max semi-space size in KB. |
+ int max_semi_space_size_in_kb() const { return max_semi_space_size_in_kb_; } |
Michael Lippautz
2017/06/14 07:25:08
I know that everything here is int, but should we
Hannes Payer (out of office)
2017/06/14 07:57:02
Done.
|
+ |
+ // Sets the max semi-space size in KB. |
+ void set_max_semi_space_size_in_kb(int 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 +6021,10 @@ class V8_EXPORT ResourceConstraints { |
} |
private: |
- int max_semi_space_size_; |
+ // max_semi_space_size_ is in KB |
+ int 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_; |