summaryrefslogtreecommitdiff
path: root/kalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'kalloc.c')
-rw-r--r--kalloc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kalloc.c b/kalloc.c
index 5ea38fd..1944508 100644
--- a/kalloc.c
+++ b/kalloc.c
@@ -45,10 +45,15 @@ kfree(char *cp, int len)
struct run **rr;
struct run *p = (struct run *) cp;
struct run *pend = (struct run *) (cp + len);
+ int i;
if(len % PAGE)
panic("kfree");
+ // XXX fill with junk to help debug
+ for(i = 0; i < len; i++)
+ cp[i] = 1;
+
rr = &freelist;
while(*rr){
struct run *rend = (struct run *) ((char *)(*rr) + (*rr)->len);