Remove vm_object_count: It's unused, incorrectly maintained and duplicates

information maintained by the zone allocator.
This commit is contained in:
alc 2002-03-17 18:37:37 +00:00
parent a8a08faa5a
commit ca0b316694

View File

@ -138,7 +138,6 @@ static int vm_object_page_collect_flush(vm_object_t object, vm_page_t p, int cur
struct object_q vm_object_list;
static struct mtx vm_object_list_mtx; /* lock for object list and count */
static long vm_object_count; /* count of all objects */
vm_object_t kernel_object;
vm_object_t kmem_object;
static struct vm_object kernel_object_store;
@ -193,7 +192,7 @@ _vm_object_allocate(objtype_t type, vm_size_t size, vm_object_t object)
object->generation++;
TAILQ_INSERT_TAIL(&vm_object_list, object, object_list);
vm_object_count++;
object_hash_rand = object->hash_rand;
}
@ -209,7 +208,6 @@ vm_object_init(void)
TAILQ_INIT(&vm_object_list);
mtx_init(&vm_object_list_mtx, "vm object_list", MTX_DEF);
vm_object_count = 0;
kernel_object = &kernel_object_store;
_vm_object_allocate(OBJT_DEFAULT, OFF_TO_IDX(VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS),
@ -1484,7 +1482,6 @@ vm_object_collapse(vm_object_t object)
backing_object,
object_list
);
vm_object_count--;
zfree(obj_zone, backing_object);