16#ifndef COOK_MEM_CIRCULAR_LIST_H
17#define COOK_MEM_CIRCULAR_LIST_H
33 CircularList () : m_head (
nullptr) {}
47 Node* next = m_head->next;
69 if (m_head ==
nullptr)
74 Node* prev = m_head->prev;
75 Node* next = m_head->next;
80 COOKMEM_ASSERT(m_head == next);
104 Node* prev = chunk->prev;
105 Node* next = chunk->next;
109 COOKMEM_ASSERT(m_head == chunk && next == chunk);
131 if (m_head ==
nullptr)
144 while (node != m_head);
154 bool isEmpty ()
const {
return m_head ==
nullptr; }
bool remove(Node *chunk)
Definition circularlist.h:102
Node * remove()
Definition circularlist.h:67
bool contains(Node *chunk)
Definition circularlist.h:129
bool isEmpty() const
Definition circularlist.h:154
void add(Node *ptr)
Definition circularlist.h:42
Definition allocator.h:29