void MarkedSpace::freeBlocks(DoublyLinkedList<MarkedBlock>& blocks) { MarkedBlock* next; for (MarkedBlock* block = blocks.head(); block; block = next) { next = block->next(); blocks.remove(block); m_blocks.remove(block); MarkedBlock::destroy(block); } }
static bool isListPagedOut(double deadline, DoublyLinkedList<MarkedBlock>& list) { unsigned itersSinceLastTimeCheck = 0; MarkedBlock* block = list.head(); while (block) { block = block->next(); ++itersSinceLastTimeCheck; if (itersSinceLastTimeCheck >= Heap::s_timeCheckResolution) { double currentTime = WTF::monotonicallyIncreasingTime(); if (currentTime > deadline) return true; itersSinceLastTimeCheck = 0; } } return false; }
inline TakeIfUnmarked::ReturnType TakeIfUnmarked::returnValue() { return m_empties.head(); }
inline Free::ReturnType Free::returnValue() { return m_blocks.head(); }