class Slab {

    public synchronized ByteBuffer takePageBuffer()
    {
        ByteBuffer buffer = available.isEmpty() ? takeNew() : takeUsed();
        if (buffer != null) {
            assert buffer.position() == 0;
            assert buffer.remaining() == pageSize;
        }
        return buffer;
    }

    public  Slab(int slabId, int slabSize, int pageSize);

}