summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorluoqi <luoqi@FreeBSD.org>1999-06-05 16:16:37 +0000
committerluoqi <luoqi@FreeBSD.org>1999-06-05 16:16:37 +0000
commit758e37e0fbe57d3f96b9b525cdbe1968fd10a31f (patch)
tree75536066ba1e851b8b41d7e748837f7e934baeb5 /sys
parentdb8fbbf0e28d18b8b0ed8b9baa63e76de74e7c62 (diff)
downloadFreeBSD-src-758e37e0fbe57d3f96b9b525cdbe1968fd10a31f.zip
FreeBSD-src-758e37e0fbe57d3f96b9b525cdbe1968fd10a31f.tar.gz
Fix an accounting problem when prefaulting 4M pages.
PR: kern/11948
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/pmap.c4
-rw-r--r--sys/i386/i386/pmap.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index a85754a..4260c1c 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
- * $Id: pmap.c,v 1.236 1999/05/28 05:38:56 alc Exp $
+ * $Id: pmap.c,v 1.237 1999/06/01 18:19:44 jlemon Exp $
*/
/*
@@ -2655,7 +2655,7 @@ pmap_copy(dst_pmap, src_pmap, dst_addr, len, src_addr)
if (srcptepaddr & PG_PS) {
if (dst_pmap->pm_pdir[ptepindex] == 0) {
dst_pmap->pm_pdir[ptepindex] = (pd_entry_t) srcptepaddr;
- dst_pmap->pm_stats.resident_count += NBPDR;
+ dst_pmap->pm_stats.resident_count += NBPDR / PAGE_SIZE;
}
continue;
}
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index a85754a..4260c1c 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.236 1999/05/28 05:38:56 alc Exp $
+ * $Id: pmap.c,v 1.237 1999/06/01 18:19:44 jlemon Exp $
*/
/*
@@ -2655,7 +2655,7 @@ pmap_copy(dst_pmap, src_pmap, dst_addr, len, src_addr)
if (srcptepaddr & PG_PS) {
if (dst_pmap->pm_pdir[ptepindex] == 0) {
dst_pmap->pm_pdir[ptepindex] = (pd_entry_t) srcptepaddr;
- dst_pmap->pm_stats.resident_count += NBPDR;
+ dst_pmap->pm_stats.resident_count += NBPDR / PAGE_SIZE;
}
continue;
}
OpenPOWER on IntegriCloud