oops. last minute simplicifaction to kalloc().
This commit is contained in:
parent
1aee6a6c4f
commit
3597d5dc70
1 changed files with 3 additions and 4 deletions
7
kalloc.c
7
kalloc.c
|
@ -24,10 +24,9 @@ kinit(void)
|
||||||
extern char end[];
|
extern char end[];
|
||||||
|
|
||||||
initlock(&kmem.lock, "kmem");
|
initlock(&kmem.lock, "kmem");
|
||||||
char *p1 = (char*)PGROUNDUP((uint)end);
|
char *p = (char*)PGROUNDUP((uint)end);
|
||||||
char *p2 = PGROUNDDOWN(PHYSTOP);
|
for( ; p + PGSIZE - 1 < (char*) PHYSTOP; p += PGSIZE)
|
||||||
for( ; p1 < p2; p1 += 4096)
|
kfree(p);
|
||||||
kfree(p1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Free the page of physical memory pointed at by v,
|
// Free the page of physical memory pointed at by v,
|
||||||
|
|
Loading…
Reference in a new issue