long requestedCapacity = configuration.getCapacity();
long desiredSegmentSize = configuration.getSegmentSize();
int segmentCount = calculateSegmentCount(requestedCapacity, desiredSegmentSize);
long segmentSize = (requestedCapacity / segmentCount + 31) & ~31L;
this.mmap = new MappedFile(configuration.getImageFile(), segmentSize * segmentCount);
this.segmentSize = (int) segmentSize;
this.segmentMask = segmentCount - 1;
this.segments = new Segment[segmentCount];
for (int i = 0; i < segmentCount; i++) {