| Index: src/spaces.h
|
| diff --git a/src/spaces.h b/src/spaces.h
|
| index ee11b6b496efd27f74f5693cb124322401d4fbc6..44e8cb6e33161393f5d494537a31929181ed44a0 100644
|
| --- a/src/spaces.h
|
| +++ b/src/spaces.h
|
| @@ -1521,6 +1521,7 @@ class FreeListCategory {
|
| FreeListNode* PickNodeFromList(int size_in_bytes, int *node_size);
|
|
|
| intptr_t EvictFreeListItemsInList(Page* p);
|
| + bool ContainsPageFreeListItemsInList(Page* p);
|
|
|
| void RepairFreeList(Heap* heap);
|
|
|
| @@ -1538,6 +1539,10 @@ class FreeListCategory {
|
|
|
| Mutex* mutex() { return &mutex_; }
|
|
|
| + bool IsEmpty() {
|
| + return top_ == NULL;
|
| + }
|
| +
|
| #ifdef DEBUG
|
| intptr_t SumFreeList();
|
| int FreeListLength();
|
| @@ -1576,7 +1581,7 @@ class FreeListCategory {
|
| // These spaces are call large.
|
| // At least 16384 words. This list is for objects of 2048 words or larger.
|
| // Empty pages are added to this list. These spaces are called huge.
|
| -class FreeList BASE_EMBEDDED {
|
| +class FreeList {
|
| public:
|
| explicit FreeList(PagedSpace* owner);
|
|
|
| @@ -1605,6 +1610,11 @@ class FreeList BASE_EMBEDDED {
|
| // 'wasted_bytes'. The size should be a non-zero multiple of the word size.
|
| MUST_USE_RESULT HeapObject* Allocate(int size_in_bytes);
|
|
|
| + bool IsEmpty() {
|
| + return small_list_.IsEmpty() && medium_list_.IsEmpty() &&
|
| + large_list_.IsEmpty() && huge_list_.IsEmpty();
|
| + }
|
| +
|
| #ifdef DEBUG
|
| void Zap();
|
| intptr_t SumFreeLists();
|
| @@ -1615,6 +1625,7 @@ class FreeList BASE_EMBEDDED {
|
| void RepairLists(Heap* heap);
|
|
|
| intptr_t EvictFreeListItems(Page* p);
|
| + bool ContainsPageFreeListItems(Page* p);
|
|
|
| FreeListCategory* small_list() { return &small_list_; }
|
| FreeListCategory* medium_list() { return &medium_list_; }
|
| @@ -1945,7 +1956,7 @@ class PagedSpace : public Space {
|
| MUST_USE_RESULT virtual HeapObject* SlowAllocateRaw(int size_in_bytes);
|
|
|
| friend class PageIterator;
|
| - friend class SweeperThread;
|
| + friend class MarkCompactCollector;
|
| };
|
|
|
|
|
|
|