Index: src/heap/spaces.h |
diff --git a/src/heap/spaces.h b/src/heap/spaces.h |
index d024c4b6a3000e700e7bda19313c92024c764a6c..747055db7bc5ccb64f24a7236996be2df881d13c 100644 |
--- a/src/heap/spaces.h |
+++ b/src/heap/spaces.h |
@@ -817,6 +817,8 @@ class Page : public MemoryChunk { |
available_in_free_list_.Increment(available); |
} |
+ size_t ShrinkToHighWaterMark(); |
+ |
#ifdef DEBUG |
void Print(); |
#endif // DEBUG |
@@ -1305,6 +1307,8 @@ class MemoryAllocator { |
intptr_t commit_area_size, |
Executability executable, Space* space); |
+ void ShrinkChunk(MemoryChunk* chunk, size_t bytes_to_shrink); |
+ |
Address ReserveAlignedMemory(size_t requested, size_t alignment, |
base::VirtualMemory* controller); |
Address AllocateAlignedMemory(size_t reserve_size, size_t commit_size, |
@@ -2186,6 +2190,10 @@ class PagedSpace : public Space { |
iterator begin() { return iterator(anchor_.next_page()); } |
iterator end() { return iterator(&anchor_); } |
+ // Shrink immortal immovable pages of the space to be exactly the size needed |
+ // using the high water mark. |
+ void ShrinkImmortalImmovablePages(); |
+ |
protected: |
// PagedSpaces that should be included in snapshots have different, i.e., |
// smaller, initial pages. |