Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/usermode/usermode Do release all l2 pages on destroy



details:   https://anonhg.NetBSD.org/src/rev/9592cfeb688a
branches:  trunk
changeset: 772401:9592cfeb688a
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Mon Jan 02 09:49:12 2012 +0000

description:
Do release all l2 pages on destroy

diffstat:

 sys/arch/usermode/usermode/pmap.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r e81d38dd7f25 -r 9592cfeb688a sys/arch/usermode/usermode/pmap.c
--- a/sys/arch/usermode/usermode/pmap.c Mon Jan 02 00:35:53 2012 +0000
+++ b/sys/arch/usermode/usermode/pmap.c Mon Jan 02 09:49:12 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.88 2012/01/01 21:40:22 reinoud Exp $ */
+/* $NetBSD: pmap.c,v 1.89 2012/01/02 09:49:12 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Reinoud Zandijk <reinoud%NetBSD.org@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.88 2012/01/01 21:40:22 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.89 2012/01/02 09:49:12 reinoud Exp $");
 
 #include "opt_memsize.h"
 #include "opt_kmempages.h"
@@ -509,6 +509,12 @@
                }
        }
 #endif
+       for (l1 = 0; l1 < pm_nl1; l1++) {
+               l2tbl = pmap->pm_l1[l1];
+               if (!l2tbl)
+                       continue;
+               pool_put(&pmap_l2_pool, l2tbl);
+       }
        pool_put(&pmap_l1_pool, pmap->pm_l1);
        pool_put(&pmap_pool, pmap);
 }



Home | Main Index | Thread Index | Old Index