modify uvmunmap() to be in aligned pages

fix a bug in fork() recovering from out of memory
This commit is contained in:
Robert Morris 2020-08-13 08:46:28 -04:00 committed by Frans Kaashoek
parent e283514ad0
commit a8dd44cf59
2 changed files with 18 additions and 21 deletions

View file

@ -175,8 +175,8 @@ proc_pagetable(struct proc *p)
void
proc_freepagetable(pagetable_t pagetable, uint64 sz)
{
uvmunmap(pagetable, TRAMPOLINE, PGSIZE, 0);
uvmunmap(pagetable, TRAPFRAME, PGSIZE, 0);
uvmunmap(pagetable, TRAMPOLINE, 1, 0);
uvmunmap(pagetable, TRAPFRAME, 1, 0);
uvmfree(pagetable, sz);
}