diff --git a/kernel/kalloc.c b/kernel/kalloc.c index b880933..eddb272 100644 --- a/kernel/kalloc.c +++ b/kernel/kalloc.c @@ -46,6 +46,7 @@ kfree(void *pa) { struct run *r; + // Assert that page is a ligned to a page boundary and that its correctly sized if(((u64)pa % PGSIZE) != 0 || (char *)pa < end || (u64)pa >= PHYSTOP) panic("kfree");