shell nits
fix Regehr complaint
This commit is contained in:
parent
50edfe1412
commit
0a4a4230a3
2 changed files with 8 additions and 4 deletions
7
vm.c
7
vm.c
|
|
@ -237,7 +237,12 @@ allocuvm(pde_t *pgdir, uint oldsz, uint newsz)
|
|||
return 0;
|
||||
}
|
||||
memset(mem, 0, PGSIZE);
|
||||
mappages(pgdir, (char*)a, PGSIZE, v2p(mem), PTE_W|PTE_U);
|
||||
if(mappages(pgdir, (char*)a, PGSIZE, v2p(mem), PTE_W|PTE_U) < 0){
|
||||
cprintf("allocuvm out of memory (2)\n");
|
||||
deallocuvm(pgdir, newsz, oldsz);
|
||||
kfree(mem);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return newsz;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue