From ea41812fe5dd8f308e8bc2f1d862cbe032eb88d7 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 16 May 1999 05:07:34 +0000 Subject: Remove prototypes for functions that don't exist anymore (vm_map.h). Remove a useless argument from vm_map_madvise's interface (vm_map.c, vm_map.h, and vm_mmap.c). Remove a redundant test in vm_uiomove (vm_map.c). Make two changes to vm_object_coalesce: 1. Determine whether the new range of pages actually overlaps the existing object's range of pages before calling vm_object_page_remove. (Prior to this change almost 90% of the calls to vm_object_page_remove were to remove pages that were beyond the end of the object.) 2. Free any swap space allocated to removed pages. --- sys/vm/vm_map.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'sys/vm/vm_map.c') diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index f43164ed94d1..d9c3f04ad20d 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.160 1999/04/04 07:11:02 alc Exp $ + * $Id: vm_map.c,v 1.161 1999/05/14 23:09:32 alc Exp $ */ /* @@ -1231,9 +1231,8 @@ vm_map_protect(vm_map_t map, vm_offset_t start, vm_offset_t end, * system call. */ void -vm_map_madvise(map, pmap, start, end, advise) +vm_map_madvise(map, start, end, advise) vm_map_t map; - pmap_t pmap; vm_offset_t start, end; int advise; { @@ -1311,7 +1310,7 @@ vm_map_madvise(map, pmap, start, end, advise) count = OFF_TO_IDX(size); vm_object_madvise(current->object.vm_object, pindex, count, advise); - pmap_object_init_pt(pmap, current->start, + pmap_object_init_pt(map->pmap, current->start, current->object.vm_object, pindex, (count << PAGE_SHIFT), 0); } @@ -2731,9 +2730,7 @@ vm_uiomove(mapa, srcobject, cp, cnta, uaddra, npages) /* * Remove unneeded old pages */ - if (first_object->resident_page_count) { - vm_object_page_remove (first_object, 0, 0, 0); - } + vm_object_page_remove(first_object, 0, 0, 0); /* * Invalidate swap space -- cgit v1.3