Make the end variable be really at the end of bss, and delete + 4096 in freerange()

This commit is contained in:
Frans Kaashoek 2019-09-08 15:18:38 -04:00
parent e5b7fa62cc
commit 035cca95fe
2 changed files with 2 additions and 3 deletions

View file

@ -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);
}

View file

@ -26,7 +26,7 @@ SECTIONS
}
.bss : {
*(.bss)
*(.sbss*)
PROVIDE(end = .);
}
}