| 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 a006d41adf842693779de4f04436644eacf6caf0..374827f5fb80c085df2c27a43ce3980432a57f4d 100644
|
| --- a/third_party/WebKit/Source/platform/heap/HeapPage.h
|
| +++ b/third_party/WebKit/Source/platform/heap/HeapPage.h
|
| @@ -308,6 +308,9 @@ class FreeListEntry final : public HeapObjectHeader {
|
| FreeListEntry* next() const { return m_next; }
|
|
|
| NO_SANITIZE_ADDRESS
|
| + FreeListEntry** prevNext() { return &m_next; }
|
| +
|
| + NO_SANITIZE_ADDRESS
|
| void append(FreeListEntry* next) {
|
| ASSERT(!m_next);
|
| m_next = next;
|
| @@ -512,6 +515,8 @@ class NormalPage final : public BasePage {
|
|
|
| inline NormalPageArena* arenaForNormalPage() const;
|
|
|
| + size_t sweepAndCompact(NormalPage*&, size_t, BasePage**);
|
| +
|
| private:
|
| HeapObjectHeader* findHeaderFromAddress(Address);
|
| void populateObjectStartBitMap();
|
| @@ -665,6 +670,8 @@ class FreeList {
|
| // All FreeListEntries in the nth list have size >= 2^n.
|
| FreeListEntry* m_freeLists[blinkPageSizeLog2];
|
|
|
| + size_t freeListSize() const;
|
| +
|
| friend class NormalPageArena;
|
| };
|
|
|
| @@ -761,8 +768,15 @@ class PLATFORM_EXPORT NormalPageArena final : public BaseArena {
|
| bool isLazySweeping() const { return m_isLazySweeping; }
|
| void setIsLazySweeping(bool flag) { m_isLazySweeping = flag; }
|
|
|
| + size_t arenaSize();
|
| + size_t freeListSize();
|
| +
|
| + void sweepAndCompact();
|
| +
|
| private:
|
| - void allocatePage();
|
| + NormalPage* allocatePage();
|
| + void allocateAndAddPage();
|
| +
|
| Address outOfLineAllocate(size_t allocationSize, size_t gcInfoIndex);
|
| Address allocateFromFreeList(size_t, size_t gcInfoIndex);
|
|
|
|
|