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/kern/imgact_aout.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'sys/kern/imgact_aout.c') diff --git a/sys/kern/imgact_aout.c b/sys/kern/imgact_aout.c index f01a6c1..3da5f99 100644 --- a/sys/kern/imgact_aout.c +++ b/sys/kern/imgact_aout.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: imgact_aout.c,v 1.50 1999/05/09 16:04:06 peter Exp $ + * $Id: imgact_aout.c,v 1.51 1999/05/14 23:09:00 alc Exp $ */ #include @@ -190,7 +190,7 @@ exec_aout_imgact(imgp) file_offset, virtual_offset, text_end, VM_PROT_READ | VM_PROT_EXECUTE, VM_PROT_ALL, - MAP_COPY_ON_WRITE); + MAP_COPY_ON_WRITE | MAP_PREFAULT); if (error) { vm_map_unlock(map); return (error); @@ -202,17 +202,13 @@ exec_aout_imgact(imgp) file_offset + a_out->a_text, text_end, data_end, VM_PROT_ALL, VM_PROT_ALL, - MAP_COPY_ON_WRITE); + MAP_COPY_ON_WRITE | MAP_PREFAULT); if (error) { vm_map_unlock(map); return (error); } } - pmap_object_init_pt(vm_map_pmap(map), virtual_offset, - object, (vm_pindex_t) OFF_TO_IDX(file_offset), - a_out->a_text + a_out->a_data, 0); - if (bss_size) { error = vm_map_insert(map, NULL, 0, data_end, data_end + bss_size, -- cgit v1.1