summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_object.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2002-12-29 21:01:14 +0000
committeralc <alc@FreeBSD.org>2002-12-29 21:01:14 +0000
commit18e93725794020e8f997db275b9b329aa1091634 (patch)
treeda5712aecb985099e8298f91d714262250b6cdb2 /sys/vm/vm_object.c
parent8a785d860594eb859234cad6615734c4a8d6f14f (diff)
downloadFreeBSD-src-18e93725794020e8f997db275b9b329aa1091634.zip
FreeBSD-src-18e93725794020e8f997db275b9b329aa1091634.tar.gz
- Remove vm_object_init2(). It is unused.
- Add a mtx_destroy() to vm_object_collapse(). (This allows a bzero() to migrate from _vm_object_allocate() to vm_object_zinit(), where it will be performed less often.)
Diffstat (limited to 'sys/vm/vm_object.c')
-rw-r--r--sys/vm/vm_object.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 5ccf4a6..ae26d19 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -180,6 +180,7 @@ vm_object_zinit(void *mem, int size)
vm_object_t object;
object = (vm_object_t)mem;
+ bzero(&object->mtx, sizeof(object->mtx));
/* These are true for any object that has been freed */
object->paging_in_progress = 0;
@@ -192,7 +193,6 @@ _vm_object_allocate(objtype_t type, vm_pindex_t size, vm_object_t object)
{
int incr;
- bzero(&object->mtx, sizeof(object->mtx));
mtx_init(&object->mtx, "vm object", NULL, MTX_DEF);
TAILQ_INIT(&object->memq);
@@ -253,11 +253,6 @@ vm_object_init(void)
}
void
-vm_object_init2(void)
-{
-}
-
-void
vm_object_set_flag(vm_object_t object, u_short bits)
{
object->flags |= bits;
@@ -1630,6 +1625,8 @@ vm_object_collapse(vm_object_t object)
);
mtx_unlock(&vm_object_list_mtx);
+ mtx_destroy(&backing_object->mtx);
+
uma_zfree(obj_zone, backing_object);
object_collapses++;
OpenPOWER on IntegriCloud