Ejemplo n.º 1
0
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);
    }
}
Ejemplo n.º 2
0
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;
}
Ejemplo n.º 3
0
inline TakeIfUnmarked::ReturnType TakeIfUnmarked::returnValue()
{
    return m_empties.head();
}
Ejemplo n.º 4
0
inline Free::ReturnType Free::returnValue()
{
    return m_blocks.head();
}