[Zion] Free all user space mappings when exitting a process.
This commit is contained in:
parent
e50d3f8abc
commit
39ac0216dd
|
@ -25,3 +25,5 @@ const uint64_t kKernelStackOffset = 4 * kPageSize;
|
|||
const uint64_t kUserStackMin = 0x00007FF0'00000000;
|
||||
const uint64_t kUserStackMax = 0x00008000'00000000;
|
||||
const uint64_t kUserStackSize = MiB;
|
||||
|
||||
const uint64_t kUserSpaceMax = 0x00008000'00000000;
|
||||
|
|
|
@ -101,7 +101,9 @@ void Process::Cleanup() {
|
|||
// 2. Release all capabailities.
|
||||
caps_.ReleaseAll();
|
||||
|
||||
// 3. Unmap all user memory. TODO
|
||||
// 3. Unmap all user memory.
|
||||
PANIC_ON_ERR(vmas_->FreeAddressRange(0, kUserSpaceMax),
|
||||
"Failed to cleanup userspace mappings in process exit.");
|
||||
|
||||
// 4. Release paging structures. TODO
|
||||
state_ = FINISHED;
|
||||
|
|
Loading…
Reference in New Issue