Skip to content

Commit

Permalink
Make the end variable be really at the end of bss, and delete + 4096 …
Browse files Browse the repository at this point in the history
…in freerange()
  • Loading branch information
kaashoek committed Sep 8, 2019
1 parent e5b7fa6 commit 035cca9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion kernel/kalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ freerange(void *pa_start, void *pa_end)
{
char *p;
p = (char*)PGROUNDUP((uint64)pa_start);
p += 4096; // XXX I can't get kernel.ld to place end beyond the last bss symbol.
for(; p + PGSIZE <= (char*)pa_end; p += PGSIZE)
kfree(p);
}
Expand Down
4 changes: 2 additions & 2 deletions kernel/kernel.ld
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SECTIONS
}
.bss : {
*(.bss)
PROVIDE(end = .);
*(.sbss*)
PROVIDE(end = .);
}

}

0 comments on commit 035cca9

Please sign in to comment.