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

Unified Diff: src/heap/spaces.h

Issue 652543007: Add support for a target new space size (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 2 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 | « 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 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();
« 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