diff options
author | alc <alc@FreeBSD.org> | 1999-05-16 05:07:34 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 1999-05-16 05:07:34 +0000 |
commit | 83a986307949a6c85689d8dc8ae7e610f6eaa789 (patch) | |
tree | 563367a37b36736593c85d0280e464ae1bbf69fa /sys/vm/vm_map.c | |
parent | c936e75142d61c8479a937a68163a5ad73bd2ef0 (diff) | |
download | FreeBSD-src-83a986307949a6c85689d8dc8ae7e610f6eaa789.zip FreeBSD-src-83a986307949a6c85689d8dc8ae7e610f6eaa789.tar.gz |
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.
Diffstat (limited to 'sys/vm/vm_map.c')
-rw-r--r-- | sys/vm/vm_map.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index f43164e..d9c3f04 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 |