summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_object.c
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1996-04-24 04:16:45 +0000
committerdyson <dyson@FreeBSD.org>1996-04-24 04:16:45 +0000
commit6c1ec28cad770d94ddd85b4afe8fd30251744506 (patch)
tree24c1be208d99dff66f1415eb70d718856cccd9ae /sys/vm/vm_object.c
parentd91e0c6ebeced877c44174fc76878d154e2752cf (diff)
downloadFreeBSD-src-6c1ec28cad770d94ddd85b4afe8fd30251744506.zip
FreeBSD-src-6c1ec28cad770d94ddd85b4afe8fd30251744506.tar.gz
This fixes kmem_malloc/kmem_free (and malloc/free of objects of > 8K).
A page index was calculated incorrectly in vm_kern, and vm_object_page_remove removed pages that should not have been.
Diffstat (limited to 'sys/vm/vm_object.c')
-rw-r--r--sys/vm/vm_object.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index e7c19ce..6b180ae 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_object.c,v 1.66 1996/03/28 04:53:26 dyson Exp $
+ * $Id: vm_object.c,v 1.67 1996/03/29 06:28:48 davidg Exp $
*/
/*
@@ -1162,12 +1162,14 @@ again:
if (size > 4 || size >= object->size / 4) {
for (p = object->memq.tqh_first; p != NULL; p = next) {
next = p->listq.tqe_next;
- if (p->wire_count != 0) {
- vm_page_protect(p, VM_PROT_NONE);
- p->valid = 0;
- continue;
- }
if ((start <= p->pindex) && (p->pindex < end)) {
+
+ if (p->wire_count != 0) {
+ vm_page_protect(p, VM_PROT_NONE);
+ p->valid = 0;
+ continue;
+ }
+
s = splhigh();
if ((p->flags & PG_BUSY) || p->busy) {
p->flags |= PG_WANTED;
@@ -1176,6 +1178,7 @@ again:
goto again;
}
splx(s);
+
if (clean_only) {
vm_page_test_dirty(p);
if (p->valid & p->dirty)
OpenPOWER on IntegriCloud