code: func (p *ByteBlockPool) AllocSlice(slice []byte, upto int) int {
  	level := slice[upto] & 15
  	newLevel := NEXT_LEVEL_ARRAY[level]
  	newSize := LEVEL_SIZE_ARRAY[newLevel]
  
  	// maybe allocate another block
  	if p.ByteUpto > BYTE_BLOCK_SIZE-newSize {
  		p.NextBuffer()
  	}
  
  	newUpto := p.ByteUpto
  	offset := newUpto + p.ByteOffset
  	p.ByteUpto += newSize
  
  	// copy forward the post 3 bytes (which we are about to overwrite
  	// with the forwarding address):
  	p.Buffer[newUpto] = slice[upto-3]
  	p.Buffer[newUpto+1] = slice[upto-2]
  	p.Buffer[newUpto+2] = slice[upto-1]
  
  	// write forwarding address at end of last slice:
  	slice[upto-3] = byte(uint(offset) >> 24)
  	slice[upto-2] = byte(uint(offset) >> 16)
  	slice[upto-1] = byte(uint(offset) >> 8)
  	slice[upto] = byte(offset)
  
  	// write new level:
  	p.Buffer[p.ByteUpto-1] = byte(16 | newLevel)
  
  	return newUpto + 3
  }
docs: /*
  Creates a new byte slice with the given starting size and returns the
  slices offset in the pool.
  */