aboutsummaryrefslogtreecommitdiff
path: root/sys/vm
diff options
context:
space:
mode:
authorJohn Dyson <dyson@FreeBSD.org>1998-05-02 06:36:16 +0000
committerJohn Dyson <dyson@FreeBSD.org>1998-05-02 06:36:16 +0000
commit86524867d1071856f5db42302f33dbcb9600776c (patch)
treefbc7405cd6b45d155a6d1c020011b37e45956f4c /sys/vm
parentb1ad8d91550c081b64108ec76e4037fea9799094 (diff)
Notes
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_map.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index f908e15ca06f1..8eef2988450d7 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.121 1998/04/29 06:59:08 dyson Exp $
+ * $Id: vm_map.c,v 1.122 1998/05/01 02:25:29 dyson Exp $
*/
/*
@@ -1924,10 +1924,16 @@ vm_map_check_protection(vm_map_t map, vm_offset_t start, vm_offset_t end,
return (TRUE);
}
+/*
+ * Split the pages in a map entry into a new object. This affords
+ * easier removal of unused pages, and keeps object inheritance from
+ * being a negative impact on memory usage.
+ */
static void
vm_map_split(entry)
vm_map_entry_t entry;
{
+ vm_page_t m;
vm_object_t orig_object, new_object;
vm_offset_t s, e;
vm_pindex_t offidxstart, offidxend, idx;
@@ -1970,7 +1976,7 @@ vm_map_split(entry)
vm_page_protect(m, VM_PROT_NONE);
vm_page_rename(m, new_object, idx);
m->dirty = VM_PAGE_BITS_ALL;
- PAGE_WAKEUP(m);
+ m->flags |= PG_BUSY;
}
if (orig_object->type == OBJT_SWAP) {
@@ -1986,6 +1992,13 @@ vm_map_split(entry)
vm_object_pip_wakeup(orig_object);
}
+ for (idx = 0; idx < size; idx++) {
+ m = vm_page_lookup(new_object, idx);
+ if (m) {
+ PAGE_WAKEUP(m);
+ }
+ }
+
entry->object.vm_object = new_object;
entry->offset = 0LL;
vm_object_deallocate(orig_object);