Index: src/spaces.h |
diff --git a/src/spaces.h b/src/spaces.h |
index 2ba567d27f83ae136b668ba71e2ea91543e2f609..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(); |
@@ -1605,6 +1610,11 @@ class FreeList { |
// '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 { |
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_; } |