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

Unified Diff: include/v8.h

Issue 2942543002: [heap] Allow a minimum semi-space size of 512K. (Closed)
Patch Set: test 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') | src/heap/heap.h » ('J')
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..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_;
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/heap/heap.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698