Beispiel #1
0
void IncrementalSweeper::sweepNextBlock()
{
    while (m_currentBlockToSweepIndex < m_blocksToSweep.size()) {
        MarkedBlock* block = m_blocksToSweep[m_currentBlockToSweepIndex++];

        if (!block->needsSweeping())
            continue;

        block->sweep();
        m_globalData->heap.objectSpace().freeOrShrinkBlock(block);
        return;
    }
}
Beispiel #2
0
void IncrementalSweeper::sweepNextBlock()
{
    while (m_currentBlockToSweepIndex < m_blocksToSweep.size()) {
        MarkedBlock* block = m_blocksToSweep[m_currentBlockToSweepIndex++];
        if (block->onlyContainsStructures())
            m_structuresCanBeSwept = true;
        else
            ASSERT(!m_structuresCanBeSwept);

        if (!block->needsSweeping())
            continue;

        block->sweep();
        m_globalData->heap.objectSpace().freeOrShrinkBlock(block);
        return;
    }
}