public synchronized SlabAllocation attachAndAllocate ( SlabRef slab , PeekingIterator < Integer > eventSizes ) { attach ( slab ) ; return allocate ( eventSizes ) ; }
Attaches a slab and allocates from it in a single atomic operation .