code: public Allocation allocate(Mutation mutation, int size)
      {
          CommitLogSegment segment = allocatingFrom();
  
          Allocation alloc;
          while ( null == (alloc = segment.allocate(mutation, size)) )
          {
              // failed to allocate, so move to a new segment with enough room
              advanceAllocatingFrom(segment);
              segment = allocatingFrom;
          }
  
          return alloc;
      }
docs: Reserve space in the current segment for the provided mutation or, if there isn't space available,
  create a new segment.
  
  @return the provided Allocation object