Skip to content
Snippets Groups Projects
Commit 3597d5dc authored by Robert Morris's avatar Robert Morris
Browse files

oops. last minute simplicifaction to kalloc().

parent 1aee6a6c
No related branches found
No related tags found
No related merge requests found
......@@ -24,10 +24,9 @@ kinit(void)
extern char end[];
initlock(&kmem.lock, "kmem");
char *p1 = (char*)PGROUNDUP((uint)end);
char *p2 = PGROUNDDOWN(PHYSTOP);
for( ; p1 < p2; p1 += 4096)
kfree(p1);
char *p = (char*)PGROUNDUP((uint)end);
for( ; p + PGSIZE - 1 < (char*) PHYSTOP; p += PGSIZE)
kfree(p);
}
// Free the page of physical memory pointed at by v,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment