// free all associated memory func (p *Process) CleanUp() { for _, v := range p.mem { runtime.Ffree(v[0], v[1]) } p.PML4 = 0 p.mem = nil }
// This is for use with unbuffered buffers made by MakeBuf // FIXME: this function does not free virtual memory func (b *Buf) Free() { n := uint64((len(b.Data) + PAGESIZE - 1) / PAGESIZE) runtime.Ffree(b.Phys, n) }