summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_object.c
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1996-12-31 16:23:38 +0000
committerdyson <dyson@FreeBSD.org>1996-12-31 16:23:38 +0000
commitb7fce42185d7564b4b32dfce1313242f80ad1d36 (patch)
tree19f238cfc4e39aca545694bd3418e0c4f2b4a19e /sys/vm/vm_object.c
parentb633be6a43d88ff9acc01d4e5156940ad2766420 (diff)
downloadFreeBSD-src-b7fce42185d7564b4b32dfce1313242f80ad1d36.zip
FreeBSD-src-b7fce42185d7564b4b32dfce1313242f80ad1d36.tar.gz
A very significant improvement in the management of process maps
and objects. Previously, "fancy" memory management techniques such as that used by the M3 RTS would have the tendancy of chopping up processes allocated memory into lots of little objects. Alan has come up with some improvements to migtigate the sitution to the point where even the M3 RTS only has one object for bss and it's managed memory (when running CVSUP.) (There are still cases where the situation isn't improved when the system pages -- but this is much much better for the vast majority of cases.) The system will now be able to much more effectively merge map entries. Submitted by: Alan Cox <alc@cs.rice.edu>
Diffstat (limited to 'sys/vm/vm_object.c')
-rw-r--r--sys/vm/vm_object.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 3c6ceeb..bb51ee2 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_object.c,v 1.81 1996/09/14 11:54:57 bde Exp $
+ * $Id: vm_object.c,v 1.82 1996/09/28 03:33:26 dyson Exp $
*/
/*
@@ -1299,13 +1299,18 @@ vm_object_coalesce(prev_object, prev_pindex, prev_size, next_size)
* pages not mapped to prev_entry may be in use anyway)
*/
- if (prev_object->ref_count > 1 ||
- prev_object->backing_object != NULL) {
+ if (prev_object->backing_object != NULL) {
return (FALSE);
}
prev_size >>= PAGE_SHIFT;
next_size >>= PAGE_SHIFT;
+
+ if ((prev_object->ref_count > 1) &&
+ (prev_object->size != prev_pindex + prev_size)) {
+ return (FALSE);
+ }
+
/*
* Remove any pages that may still be in the object from a previous
* deallocation.
OpenPOWER on IntegriCloud