SmallLine* Heap::allocateSmallLineSlowCase(std::lock_guard<StaticMutex>& lock, size_t smallSizeClass) { m_isAllocatingPages = true; SmallPage* page = [this]() { if (m_smallPages.size()) return m_smallPages.pop(); SmallPage* page = m_vmHeap.allocateSmallPage(); vmAllocatePhysicalPages(page->begin()->begin(), vmPageSize); return page; }(); SmallLine* line = page->begin(); Vector<SmallLine*>& smallLines = m_smallLines[smallSizeClass]; for (auto it = line + 1; it != page->end(); ++it) smallLines.push(it); BASSERT(!line->refCount(lock)); page->setSmallSizeClass(smallSizeClass); page->ref(lock); return line; }