From 5027a84ea7bd51ec7adccf0f8ae6513e17026a6b Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 18 Sep 2004 17:33:18 +0000 Subject: [PATCH] Only destroy pages up to PHYS_BASE. --- src/userprog/pagedir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/userprog/pagedir.c b/src/userprog/pagedir.c index 1bad9b2..39a8f0a 100644 --- a/src/userprog/pagedir.c +++ b/src/userprog/pagedir.c @@ -19,7 +19,7 @@ pagedir_destroy (uint32_t *pd) { uint32_t *pde; - for (pde = pd; pde < pd + PGSIZE / sizeof *pde; pde++) + for (pde = pd; pde < pd + pd_no (PHYS_BASE); pde++) if (*pde & PG_P) { uint32_t *pt = pde_get_pt (*pde); -- 2.30.2