1 files changed, 1 insertions, 1 deletions
diff --git a/kalloc.c b/kalloc.c index e31d71d..bf1616a 100644 --- a/ kalloc.c+++ b/ kalloc.c@@ -27,7 +27,7 @@ kinit(void) initlock(&kmem.lock, "kmem"); p = (char*)PGROUNDUP((uint)end); - for(; p + PGSIZE - 1 < (char*)PHYSTOP; p += PGSIZE) + for(; p + PGSIZE <= (char*)PHYSTOP; p += PGSIZE) kfree(p); } |