diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index abc1765000f2..25e03a2469f8 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -1,4 +1,4 @@ -/* $Id: sysv_shm.c,v 1.35 1998/03/30 09:50:46 phk Exp $ */ +/* $Id: sysv_shm.c,v 1.36 1998/05/04 03:01:37 dyson Exp $ */ /* $NetBSD: sysv_shm.c,v 1.23 1994/07/04 23:25:12 glass Exp $ */ /* @@ -145,7 +145,6 @@ shm_deallocate_segment(shmseg) size_t size; shm_handle = shmseg->shm_internal; - shm_handle->shm_object->shadow_count--; vm_object_deallocate(shm_handle->shm_object); free((caddr_t)shm_handle, M_SHM); shmseg->shm_internal = NULL; @@ -504,8 +503,8 @@ shmget_allocate_segment(p, uap, mode) shm_handle->shm_object = vm_pager_allocate(OBJT_SWAP, 0, OFF_TO_IDX(size), VM_PROT_DEFAULT, 0); - shm_handle->shm_object->shadow_count++; shm_handle->shm_object->flags &= ~OBJ_ONEMAPPING; + shm_handle->shm_object->flags |= OBJ_NOSPLIT; shmseg->shm_internal = shm_handle; shmseg->shm_perm.cuid = shmseg->shm_perm.uid = cred->cr_uid; diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index ab961b3e4bf6..aeecbf83f1d3 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.123 1998/05/02 06:36:16 dyson Exp $ + * $Id: vm_map.c,v 1.124 1998/05/04 03:01:44 dyson Exp $ */ /* @@ -1832,7 +1832,7 @@ vm_map_delete(map, start, end) } else { pmap_remove(map->pmap, s, e); if (object && - (object->flags & OBJ_ONEMAPPING) && + ((object->flags & (OBJ_NOSPLIT|OBJ_ONEMAPPING)) == OBJ_ONEMAPPING) && ((object->type == OBJT_SWAP) || (object->type == OBJT_DEFAULT))) { vm_object_collapse(object); vm_object_page_remove(object, offidxstart, offidxend, FALSE); @@ -2051,7 +2051,7 @@ vm_map_copy_entry(src_map, dst_map, src_entry, dst_entry) (src_object->type == OBJT_DEFAULT || src_object->type == OBJT_SWAP)) { vm_object_collapse(src_object); - if (src_object->flags & OBJ_ONEMAPPING) { + if ((src_object->flags & (OBJ_NOSPLIT|OBJ_ONEMAPPING)) == OBJ_ONEMAPPING) { vm_map_split(src_entry); src_map->timestamp++; src_object = src_entry->object.vm_object; diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index cc9c6bc05f53..e700d5321a69 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_object.h,v 1.47 1998/03/07 21:37:09 dyson Exp $ + * $Id: vm_object.h,v 1.48 1998/04/29 04:28:12 dyson Exp $ */ /* @@ -128,6 +128,7 @@ struct vm_object { */ #define OBJ_ACTIVE 0x0004 /* active objects */ #define OBJ_DEAD 0x0008 /* dead objects (during rundown) */ +#define OBJ_NOSPLIT 0x0010 /* dont split this object */ #define OBJ_PIPWNT 0x0040 /* paging in progress wanted */ #define OBJ_WRITEABLE 0x0080 /* object has been made writable */ #define OBJ_MIGHTBEDIRTY 0x0100 /* object might be dirty */