diff options
author | attilio <attilio@FreeBSD.org> | 2013-03-04 13:14:59 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2013-03-04 13:14:59 +0000 |
commit | 1be810ec7308568f15799ceb7f6ad7162994537c (patch) | |
tree | fb5f2f94d7ff72f1714d3bbeff57da4a8fff44e6 /sys/vm/vm_object.c | |
parent | df5bf2af9de4e98baa790d9a97d7617ce5baab8f (diff) | |
parent | e5bdd2f06e53c260f9b92776f7f3b1fe5c140dae (diff) | |
download | FreeBSD-src-1be810ec7308568f15799ceb7f6ad7162994537c.zip FreeBSD-src-1be810ec7308568f15799ceb7f6ad7162994537c.tar.gz |
MFC
Diffstat (limited to 'sys/vm/vm_object.c')
-rw-r--r-- | sys/vm/vm_object.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 9c40b41..c219069 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -168,8 +168,9 @@ vm_object_zdtor(void *mem, int size, void *arg) ("object %p resident_page_count = %d", object, object->resident_page_count)); KASSERT(TAILQ_EMPTY(&object->memq), - ("object %p has resident pages", - object)); + ("object %p has resident pages in its memq", object)); + KASSERT(object->root == NULL, + ("object %p has resident pages in its tree", object)); #if VM_NRESERVLEVEL > 0 KASSERT(LIST_EMPTY(&object->rvq), ("object %p has reservations", @@ -197,9 +198,11 @@ vm_object_zinit(void *mem, int size, int flags) mtx_init(&object->mtx, "vm object", NULL, MTX_DEF | MTX_DUPOK); /* These are true for any object that has been freed */ + object->root = NULL; object->paging_in_progress = 0; object->resident_page_count = 0; object->shadow_count = 0; + object->cache = NULL; return (0); } @@ -210,7 +213,6 @@ _vm_object_allocate(objtype_t type, vm_pindex_t size, vm_object_t object) TAILQ_INIT(&object->memq); LIST_INIT(&object->shadow_head); - object->rtree.rt_root = 0; object->type = type; switch (type) { case OBJT_DEAD: |