Don't junk kfree'd pages at boot

上级 fd939840
...@@ -65,7 +65,8 @@ kfree(char *v) ...@@ -65,7 +65,8 @@ kfree(char *v)
panic("kfree"); panic("kfree");
// Fill with junk to catch dangling refs. // Fill with junk to catch dangling refs.
memset(v, 1, PGSIZE); if (kinited)
memset(v, 1, PGSIZE);
struct kmem *m = kmem; struct kmem *m = kmem;
acquire(&m->lock); acquire(&m->lock);
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论