diff options
author | alc <alc@FreeBSD.org> | 1999-05-17 00:53:56 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 1999-05-17 00:53:56 +0000 |
commit | 936a55303324f390417668b877ccabddca5cc384 (patch) | |
tree | 710bb6c848d0b2fdbb018a2b9eeaac6b17679b33 /sys/vm/vm_map.c | |
parent | 1762400fc86f27481374190b1694040c5e805fcc (diff) | |
download | FreeBSD-src-936a55303324f390417668b877ccabddca5cc384.zip FreeBSD-src-936a55303324f390417668b877ccabddca5cc384.tar.gz |
Add the options MAP_PREFAULT and MAP_PREFAULT_PARTIAL to vm_map_find/insert,
eliminating the need for the pmap_object_init_pt calls in imgact_* and
mmap.
Reviewed by: David Greenman <dg@root.com>
Diffstat (limited to 'sys/vm/vm_map.c')
-rw-r--r-- | sys/vm/vm_map.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index d9c3f04..882a81b 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_map.c,v 1.161 1999/05/14 23:09:32 alc Exp $ + * $Id: vm_map.c,v 1.162 1999/05/16 05:07:31 alc Exp $ */ /* @@ -561,6 +561,11 @@ vm_map_insert(vm_map_t map, vm_object_t object, vm_ooffset_t offset, (prev_entry->end >= new_entry->start)) map->first_free = new_entry; + if (cow & (MAP_PREFAULT|MAP_PREFAULT_PARTIAL)) + pmap_object_init_pt(map->pmap, start, + object, OFF_TO_IDX(offset), end - start, + cow & MAP_PREFAULT_PARTIAL); + return (KERN_SUCCESS); } |