| Index: src/spaces.h
|
| diff --git a/src/spaces.h b/src/spaces.h
|
| index 2062f5fea5788131ca68585271c27424395ec71c..a44b5fe30395d549f7663bac7a5bd3557f4453ec 100644
|
| --- a/src/spaces.h
|
| +++ b/src/spaces.h
|
| @@ -601,6 +601,8 @@ class MemoryChunk {
|
| return static_cast<int>(area_end() - area_start());
|
| }
|
|
|
| + size_t CommittedPhysicalMemory();
|
| +
|
| protected:
|
| MemoryChunk* next_chunk_;
|
| MemoryChunk* prev_chunk_;
|
| @@ -1474,6 +1476,9 @@ class PagedSpace : public Space {
|
| // spaces this equals the capacity.
|
| intptr_t CommittedMemory() { return Capacity(); }
|
|
|
| + // Total amount of physical memory committed for this space.
|
| + size_t CommittedPhysicalMemory();
|
| +
|
| // Sets the capacity, the available space and the wasted space to zero.
|
| // The stats are rebuilt during sweeping by adding each page to the
|
| // capacity and the size when it is encountered. As free spaces are
|
| @@ -1940,6 +1945,8 @@ class SemiSpace : public Space {
|
|
|
| static void Swap(SemiSpace* from, SemiSpace* to);
|
|
|
| + size_t CommittedPhysicalMemory();
|
| +
|
| private:
|
| // Flips the semispace between being from-space and to-space.
|
| // Copies the flags into the masked positions on all pages in the space.
|
| @@ -2137,6 +2144,12 @@ class NewSpace : public Space {
|
| return Capacity();
|
| }
|
|
|
| + size_t CommittedPhysicalMemory() {
|
| + return to_space_.CommittedPhysicalMemory()
|
| + + (from_space_.is_committed() ? from_space_.CommittedPhysicalMemory()
|
| + : 0);
|
| + }
|
| +
|
| // Return the available bytes without growing.
|
| intptr_t Available() {
|
| return Capacity() - Size();
|
| @@ -2504,6 +2517,8 @@ class LargeObjectSpace : public Space {
|
| return Size();
|
| }
|
|
|
| + size_t CommittedPhysicalMemory();
|
| +
|
| int PageCount() {
|
| return page_count_;
|
| }
|
|
|