| Index: third_party/WebKit/Source/platform/heap/HeapPage.h
|
| diff --git a/third_party/WebKit/Source/platform/heap/HeapPage.h b/third_party/WebKit/Source/platform/heap/HeapPage.h
|
| index 21158986d489ddafa800eec7fda910a8bf57832b..64a28a9fe5ae4b8a3715e9d1e1a37b20e2631b70 100644
|
| --- a/third_party/WebKit/Source/platform/heap/HeapPage.h
|
| +++ b/third_party/WebKit/Source/platform/heap/HeapPage.h
|
| @@ -36,6 +36,7 @@
|
| #include "platform/PlatformExport.h"
|
| #include "platform/heap/BlinkGC.h"
|
| #include "platform/heap/GCInfo.h"
|
| +#include "platform/heap/PagePool.h"
|
| #include "platform/heap/ThreadState.h"
|
| #include "platform/heap/Visitor.h"
|
| #include "platform/wtf/AddressSanitizer.h"
|
| @@ -391,7 +392,8 @@ class BasePage {
|
| // following methods are not performance-sensitive.
|
| virtual size_t ObjectPayloadSizeForTesting() = 0;
|
| virtual bool IsEmpty() = 0;
|
| - virtual void RemoveFromHeap() = 0;
|
| + virtual void RemoveFromHeap(
|
| + DecommitMemoryTiming = DecommitMemoryTiming::DecommitAsAppropriate) = 0;
|
| virtual void Sweep() = 0;
|
| virtual void MakeConsistentForMutator() = 0;
|
| virtual void InvalidateObjectStartBitmap() = 0;
|
| @@ -474,7 +476,8 @@ class NormalPage final : public BasePage {
|
|
|
| size_t ObjectPayloadSizeForTesting() override;
|
| bool IsEmpty() override;
|
| - void RemoveFromHeap() override;
|
| + void RemoveFromHeap(DecommitMemoryTiming =
|
| + DecommitMemoryTiming::DecommitAsAppropriate) override;
|
| void Sweep() override;
|
| void MakeConsistentForMutator() override;
|
| void InvalidateObjectStartBitmap() override {
|
| @@ -522,9 +525,14 @@ class NormalPage final : public BasePage {
|
| NormalPage* current_page_ = nullptr;
|
| // Offset into |m_currentPage| to the next free address.
|
| size_t allocation_point_ = 0;
|
| +
|
| + void AddAvailable(BasePage*);
|
| + BasePage* TakeAvailable();
|
| // Chain of available pages to use for compaction. Page compaction picks the
|
| // next one when the current one is exhausted.
|
| BasePage* available_pages_ = nullptr;
|
| + BasePage* last_available_ = nullptr;
|
| +
|
| // Chain of pages that have been compacted. Page compaction will add
|
| // compacted pages once the current one becomes exhausted.
|
| BasePage** compacted_pages_ = nullptr;
|
| @@ -565,7 +573,8 @@ class LargeObjectPage final : public BasePage {
|
|
|
| size_t ObjectPayloadSizeForTesting() override;
|
| bool IsEmpty() override;
|
| - void RemoveFromHeap() override;
|
| + void RemoveFromHeap(DecommitMemoryTiming =
|
| + DecommitMemoryTiming::DecommitAsAppropriate) override;
|
| void Sweep() override;
|
| void MakeConsistentForMutator() override;
|
| void InvalidateObjectStartBitmap() override {}
|
| @@ -780,7 +789,7 @@ class PLATFORM_EXPORT NormalPageArena final : public BaseArena {
|
|
|
| Address AllocateObject(size_t allocation_size, size_t gc_info_index);
|
|
|
| - void FreePage(NormalPage*);
|
| + void FreePage(NormalPage*, DecommitMemoryTiming);
|
|
|
| bool Coalesce();
|
| void PromptlyFreeObject(HeapObjectHeader*);
|
|
|