Available space.
auto b = defaultAllocator.make!ReadBuffer; size_t numberRead; // Fills the buffer with values 0..10 assert(b.free == b.blockSize); numberRead = fillBuffer(b[], b.free, 0, 10); b += numberRead; assert(b.free == b.blockSize - numberRead); b.clear(); assert(b.free == b.blockSize); defaultAllocator.dispose(b);