Index: src/heap/spaces.h |
diff --git a/src/heap/spaces.h b/src/heap/spaces.h |
index ef55357163924af08705b59366101e4747069b46..5be9c3a11fdfbe4d7659786217ff74dd83304bd0 100644 |
--- a/src/heap/spaces.h |
+++ b/src/heap/spaces.h |
@@ -2075,7 +2075,8 @@ class SemiSpace : public Space { |
current_page_(NULL) {} |
// Sets up the semispace using the given chunk. |
- void SetUp(Address start, int initial_capacity, int maximum_capacity); |
+ void SetUp(Address start, int initial_capacity, int target_capacity, |
+ int maximum_capacity); |
// Tear down the space. Heap memory was not allocated by the space, so it |
// is not deallocated here. |
@@ -2094,6 +2095,9 @@ class SemiSpace : public Space { |
// semispace and less than the current capacity. |
bool ShrinkTo(int new_capacity); |
+ // Sets the total capacity. Only possible when the space is not committed. |
+ bool SetTotalCapacity(int new_capacity); |
+ |
// Returns the start address of the first page of the space. |
Address space_start() { |
DCHECK(anchor_.next_page() != &anchor_); |
@@ -2168,6 +2172,9 @@ class SemiSpace : public Space { |
// Returns the current total capacity of the semispace. |
int TotalCapacity() { return total_capacity_; } |
+ // Returns the target for total capacity of the semispace. |
+ int TargetCapacity() { return target_capacity_; } |
+ |
// Returns the maximum total capacity of the semispace. |
int MaximumTotalCapacity() { return maximum_total_capacity_; } |
@@ -2196,6 +2203,7 @@ class SemiSpace : public Space { |
// The current and maximum total capacity of the space. |
int total_capacity_; |
+ int target_capacity_; |
int maximum_total_capacity_; |
int initial_total_capacity_; |
@@ -2341,6 +2349,9 @@ class NewSpace : public Space { |
// their maximum capacity. |
void Grow(); |
+ // Grow the capacity of the semispaces by one page. |
+ bool GrowOnePage(); |
+ |
// Shrink the capacity of the semispaces. |
void Shrink(); |