| Index: src/heap/spaces.h
|
| diff --git a/src/heap/spaces.h b/src/heap/spaces.h
|
| index 97f9de996f6cc8abd753072b4c003ac36bb4add9..7715734c90aea3abd743228e4d9f547b3208703b 100644
|
| --- a/src/heap/spaces.h
|
| +++ b/src/heap/spaces.h
|
| @@ -622,6 +622,7 @@ class MemoryChunk {
|
| }
|
|
|
| size_t size() const { return size_; }
|
| + void set_size(size_t size) { size_ = size; }
|
|
|
| inline Heap* heap() const { return heap_; }
|
|
|
| @@ -654,7 +655,7 @@ class MemoryChunk {
|
| bool CommitArea(size_t requested);
|
|
|
| // Approximate amount of physical memory committed for this chunk.
|
| - size_t CommittedPhysicalMemory() { return high_water_mark_.Value(); }
|
| + size_t CommittedPhysicalMemory();
|
|
|
| Address HighWaterMark() { return address() + high_water_mark_.Value(); }
|
|
|
| @@ -992,6 +993,10 @@ class LargePage : public MemoryChunk {
|
|
|
| inline void set_next_page(LargePage* page) { set_next_chunk(page); }
|
|
|
| + // Uncommit memory that is not in use anymore by the object. If the object
|
| + // cannot be shrunk 0 is returned.
|
| + Address GetAddressToShrink();
|
| +
|
| // A limit to guarantee that we do not overflow typed slot offset in
|
| // the old to old remembered set.
|
| // Note that this limit is higher than what assembler already imposes on
|
| @@ -1443,6 +1448,7 @@ class MemoryAllocator {
|
| bool CommitMemory(Address addr, size_t size, Executability executable);
|
|
|
| void FreeMemory(base::VirtualMemory* reservation, Executability executable);
|
| + void PartialFreeMemory(MemoryChunk* chunk, Address start_free);
|
| void FreeMemory(Address addr, size_t size, Executability executable);
|
|
|
| // Commit a contiguous block of memory from the initial chunk. Assumes that
|
| @@ -1494,6 +1500,9 @@ class MemoryAllocator {
|
| // FreeMemory can be called concurrently when PreFree was executed before.
|
| void PerformFreeMemory(MemoryChunk* chunk);
|
|
|
| + void PartialFreeMemory(base::VirtualMemory* reservation,
|
| + Executability executable, Address free_start);
|
| +
|
| // See AllocatePage for public interface. Note that currently we only support
|
| // pools for NOT_EXECUTABLE pages of size MemoryChunk::kPageSize.
|
| template <typename SpaceType>
|
|
|