From 936a55303324f390417668b877ccabddca5cc384 Mon Sep 17 00:00:00 2001 From: alc Date: Mon, 17 May 1999 00:53:56 +0000 Subject: 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 --- sys/vm/vm_map.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sys/vm/vm_map.c') 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); } -- cgit v1.1