kernel/vm.c
void
uvmfree(pagetable_t pagetable, uint64 sz)
{
  if(sz > 0)
    vmunmap(pagetable, 0, PGROUNDUP(sz)/PGSIZE, 1);
  freewalk(pagetable);
}
// Free user memory pages,
// then free page-table pages.
Free user memory pages,
then free page-table pages.
Free user memory pages then free page - table pages .
void
uvmfree(pagetable_t pagetable, uint64 sz)
{
  if(sz > 0)
    vmunmap(pagetable, 0, PGROUNDUP(sz)/PGSIZE, 1);
  freewalk(pagetable);
}
void uvmfree ( pagetable_t pagetable , uint64 sz ) { if ( sz > 0 ) vmunmap ( pagetable , 0 , PGROUNDUP ( sz ) / PGSIZE , 1 ) ; freewalk ( pagetable ) ; }
Free user memory pages,
then free page-table pages.
Free user memory pages then free page - table pages .