diff options
author | dyson <dyson@FreeBSD.org> | 1996-06-12 06:52:12 +0000 |
---|---|---|
committer | dyson <dyson@FreeBSD.org> | 1996-06-12 06:52:12 +0000 |
commit | cfc0d659e7df2db91128c1aae09e0c33c8ad4bda (patch) | |
tree | 9b7f4b43980b8b0603cc3130a1ac93a4d5944ca8 /sys/i386 | |
parent | defc0f2e29b7338afed42857ea83d1a1da05c003 (diff) | |
download | FreeBSD-src-cfc0d659e7df2db91128c1aae09e0c33c8ad4bda.zip FreeBSD-src-cfc0d659e7df2db91128c1aae09e0c33c8ad4bda.tar.gz |
Fix a very significant cnt.v_wire_count leak in vm_page.c, and some
minor leaks in pmap.c. Bruce Evans made me aware of this problem.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/pmap.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 46cf1a8..345b80c 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -39,7 +39,7 @@ * SUCH DAMAGE. * * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 - * $Id: pmap.c,v 1.102 1996/06/08 06:48:27 dyson Exp $ + * $Id: pmap.c,v 1.103 1996/06/12 05:02:52 gpalmer Exp $ */ /* @@ -418,8 +418,8 @@ pmap_unwire_pte_hold(vm_page_t m) { --cnt.v_wire_count; m->dirty = 0; vm_page_deactivate(m); + return 1; } - return 1; } return 0; } @@ -1431,8 +1431,9 @@ retry: s = splvm(); vm_page_unqueue(m); splx(s); + if (m->wire_count == 0) + ++cnt.v_wire_count; ++m->wire_count; - ++cnt.v_wire_count; } /* @@ -1510,8 +1511,9 @@ pmap_allocpte(pmap, va) int s = splvm(); vm_page_unqueue(m); splx(s); + if (m->wire_count == 0) + ++cnt.v_wire_count; ++m->wire_count; - ++cnt.v_wire_count; } ++m->hold_count; return m; |