package two const empty = -1 type block struct { used int free []int offset int } func newBlock(used, start, end int) block { return block{ used: used, free: []int{start, start + end}, offset: 0, } } func (b *block) available() int { return b.free[1] - b.free[0] }