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

Unified Diff: src/heap/spaces.h

Issue 734363002: Introduce an option to do regular new space growing for a while (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 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 | « src/heap/heap.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces.h
diff --git a/src/heap/spaces.h b/src/heap/spaces.h
index ef294b243948b3cd4bbdc5101385baf295cb8a73..ee4116a2ee79f825cbb8ef5e2a742ed484e33e0c 100644
--- a/src/heap/spaces.h
+++ b/src/heap/spaces.h
@@ -2339,7 +2339,8 @@ class NewSpace : public Space {
to_space_(heap, kToSpace),
from_space_(heap, kFromSpace),
reservation_(),
- inline_allocation_limit_step_(0) {}
+ inline_allocation_limit_step_(0),
+ grow_to_target_capacity_(false) {}
// Sets up the new space using the given chunk.
bool SetUp(int reserved_semispace_size_, int max_semi_space_size);
@@ -2569,6 +2570,10 @@ class NewSpace : public Space {
SemiSpace* active_space() { return &to_space_; }
+ void set_grow_to_target_capacity(bool grow_to_target_capacity) {
+ grow_to_target_capacity_ = grow_to_target_capacity;
+ }
+
private:
// Update allocation info to match the current to-space page.
void UpdateAllocationInfo();
@@ -2600,6 +2605,10 @@ class NewSpace : public Space {
Address top_on_previous_step_;
+ // True if the new space should be expanded up to the target capacity
+ // when the current page is full.
+ bool grow_to_target_capacity_;
+
HistogramInfo* allocated_histogram_;
HistogramInfo* promoted_histogram_;
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698