Make the end variable be really at the end of bss, and delete + 4096 in freerange()
This commit is contained in:
parent
e5b7fa62cc
commit
035cca95fe
|
@ -35,7 +35,6 @@ freerange(void *pa_start, void *pa_end)
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
p = (char*)PGROUNDUP((uint64)pa_start);
|
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)
|
for(; p + PGSIZE <= (char*)pa_end; p += PGSIZE)
|
||||||
kfree(p);
|
kfree(p);
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ SECTIONS
|
||||||
}
|
}
|
||||||
.bss : {
|
.bss : {
|
||||||
*(.bss)
|
*(.bss)
|
||||||
|
*(.sbss*)
|
||||||
PROVIDE(end = .);
|
PROVIDE(end = .);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue