     _totalBytesAllocated += byteCount
 
     // Check if the current slab has enough space.
-    if !slabs.isEmpty {
-      let aligned = currentPtr!.alignedUp(toMultipleOf: alignment)
-      if aligned + byteCount <= endPtr! {
-        currentPtr = aligned + byteCount
-        return .init(start: aligned, count: byteCount)
-      }
+    if let allocated = allocateFromCurrentSlab(byteCount, alignment) {
+      return allocated
     }
 
     // If the size is too big, allocate a dedicated slab for it.

  deinit {
    /// Deallocate all memory.
    _totalBytesAllocated = 0
    currentPtr = nil
    endPtr = nil
    while let slab = slabs.popLast() {
      slab.deallocate()
    }


    // Otherwise, start a new slab and try again.
    startNewSlab()
    if let allocated = allocateFromCurrentSlab(byteCount, alignment) {
      return allocated
    }
    fatalError("Unable to allocate memory!")
  }

  /// Allocate a chunk of bound memory of `MemoryLayout<T>.stride * count'.
