Index: src/heap/spaces.h |
diff --git a/src/heap/spaces.h b/src/heap/spaces.h |
index c035342bfa85058dd9be34024e17cbc6d5722be3..6e75abd39d014e0b897cd23839182f04890eaba3 100644 |
--- a/src/heap/spaces.h |
+++ b/src/heap/spaces.h |
@@ -689,7 +689,7 @@ class Page : public MemoryChunk { |
// account. |
// TODO(hpayer): This limit should be way smaller but we currently have |
// short living objects >256K. |
- static const int kMaxRegularHeapObjectSize = 600 * KB; |
+ static const int kMaxRegularHeapObjectSize = 400 * KB; |
static inline Page* ConvertNewToOld(Page* old_page, PagedSpace* new_owner); |
@@ -1270,6 +1270,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, |
@@ -1575,6 +1577,7 @@ class AllocationStats BASE_EMBEDDED { |
capacity_ -= size_in_bytes; |
size_ -= size_in_bytes; |
CHECK_GE(size_, 0); |
+ CHECK_GE(capacity_, 0); |
} |
// Allocate from available bytes (available -> size). |
@@ -2140,6 +2143,10 @@ class PagedSpace : public Space { |
iterator begin() { return iterator(anchor_.next_page()); } |
iterator end() { return iterator(&anchor_); } |
+ // Shrink all pages of the space to be exactly the size needed using the |
+ // high water mark. |
Hannes Payer (out of office)
2016/08/10 21:17:35
We only do that for immortal immovable pages.
Michael Lippautz
2016/08/11 09:48:10
Done.
|
+ void ShrinkImmortalImmovablePages(); |
+ |
protected: |
// PagedSpaces that should be included in snapshots have different, i.e., |
// smaller, initial pages. |