code: func (b *bufferManager) alloc() *queue.TxBuffer {
  	if b.freeList != nil {
  		// There is a descriptor ready for reuse in the free list.
  		d := b.freeList
  		b.freeList = d.Next
  		d.Next = nil
  		return d
  	}
  
  	if b.curOffset < b.limit {
  		// There is room available in the never-used range, so create
  		// a new descriptor for it.
  		d := &queue.TxBuffer{
  			Offset: b.curOffset,
  			Size:   b.entrySize,
  		}
  		b.curOffset += uint64(b.entrySize)
  		return d
  	}
  
  	return nil
  }
docs: // alloc allocates a buffer from the manager, if one is available.