From 7d7dc9331bf33f77c9c3a71350782dadae8dd371 Mon Sep 17 00:00:00 2001 From: Robert Morris Date: Tue, 31 Aug 2010 12:54:47 -0400 Subject: kalloc/kfree now only a page at a time do not keep sorted contiguous free list --- pipe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pipe.c') diff --git a/pipe.c b/pipe.c index 4a1857c..bc847b9 100644 --- a/pipe.c +++ b/pipe.c @@ -27,7 +27,7 @@ pipealloc(struct file **f0, struct file **f1) *f0 = *f1 = 0; if((*f0 = filealloc()) == 0 || (*f1 = filealloc()) == 0) goto bad; - if((p = (struct pipe*)kalloc(PAGE)) == 0) + if((p = (struct pipe*)kalloc()) == 0) goto bad; p->readopen = 1; p->writeopen = 1; @@ -47,7 +47,7 @@ pipealloc(struct file **f0, struct file **f1) //PAGEBREAK: 20 bad: if(p) - kfree((char*)p, PAGE); + kfree((char*)p); if(*f0) fileclose(*f0); if(*f1) @@ -68,7 +68,7 @@ pipeclose(struct pipe *p, int writable) } if(p->readopen == 0 && p->writeopen == 0) { release(&p->lock); - kfree((char*)p, PAGE); + kfree((char*)p); } else release(&p->lock); } -- cgit v1.2.3