summaryrefslogtreecommitdiff
path: root/pipe.c
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2010-08-31 12:54:47 -0400
committerRobert Morris <[email protected]>2010-08-31 12:54:47 -0400
commit7d7dc9331bf33f77c9c3a71350782dadae8dd371 (patch)
tree4c9d10f56fe4f69b97820ef94db93f30acda6e65 /pipe.c
parent81b30b14d6925a0f5c9eb114724457d90869949c (diff)
downloadxv6-labs-7d7dc9331bf33f77c9c3a71350782dadae8dd371.tar.gz
xv6-labs-7d7dc9331bf33f77c9c3a71350782dadae8dd371.tar.bz2
xv6-labs-7d7dc9331bf33f77c9c3a71350782dadae8dd371.zip
kalloc/kfree now only a page at a time
do not keep sorted contiguous free list
Diffstat (limited to 'pipe.c')
-rw-r--r--pipe.c6
1 files changed, 3 insertions, 3 deletions
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);
}