xv6

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 5c4dc7395b75d8b41c1104fe59a0d14d81a8a428
parent ba04b3e70e4f1916c777d62de53088d96b09579f
Author: Austin Clements <amdragon@mit.edu>
Date:   Wed,  1 Sep 2010 00:31:04 -0400

Merge branch 'master' of git+ssh://am.lcs/home/am0/6.828/xv6

Diffstat:
Mkalloc.c | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/kalloc.c b/kalloc.c @@ -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); } //PAGEBREAK: 21