diff options
author | dyson <dyson@FreeBSD.org> | 1996-06-25 00:39:21 +0000 |
---|---|---|
committer | dyson <dyson@FreeBSD.org> | 1996-06-25 00:39:21 +0000 |
commit | 63f9541399456ee7de078c0690f32d41c4e0da5f (patch) | |
tree | 6954c53eaae5df1a5721de058865f1bed6b8e8db /sys | |
parent | 43e1aa7ef69aa819981bc28c15e92cd10b208224 (diff) | |
download | FreeBSD-src-63f9541399456ee7de078c0690f32d41c4e0da5f.zip FreeBSD-src-63f9541399456ee7de078c0690f32d41c4e0da5f.tar.gz |
Limit the scan for preloading pte's to the end of an object.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/pmap.c | 5 | ||||
-rw-r--r-- | sys/i386/i386/pmap.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 3a2a73c..970bd3b 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.105 1996/06/17 03:35:23 dyson Exp $ + * $Id: pmap.c,v 1.106 1996/06/18 01:22:06 bde Exp $ */ /* @@ -1768,6 +1768,9 @@ pmap_object_init_pt(pmap, addr, object, pindex, size, limit) return; } + if (psize + pindex > object->size) + psize = object->size - pindex; + /* * if we are processing a major portion of the object, then scan the * entire thing. diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 3a2a73c..970bd3b 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.105 1996/06/17 03:35:23 dyson Exp $ + * $Id: pmap.c,v 1.106 1996/06/18 01:22:06 bde Exp $ */ /* @@ -1768,6 +1768,9 @@ pmap_object_init_pt(pmap, addr, object, pindex, size, limit) return; } + if (psize + pindex > object->size) + psize = object->size - pindex; + /* * if we are processing a major portion of the object, then scan the * entire thing. |