struct vm_map_entry *dead_entries;
vm_map_entry_t dead_entries;
uvmspace_free(vm)	struct vmspace *vm;{	struct vm_map_entry *dead_entries;	UVMHIST_FUNC("uvmspace_free"); UVMHIST_CALLED(maphist);	UVMHIST_LOG(maphist,"(vm=0x%x) ref=%d", vm, vm->vm_refcnt,0,0);	if (--vm->vm_refcnt == 0) {		/*		 * lock the map, to wait out all other references to it.  delete		 * all of the mappings and pages they hold, then call the pmap		 * module to reclaim anything left.		 */#ifdef SYSVSHM		/* Get rid of any SYSV shared memory segments. */		if (vm->vm_shm != NULL)			shmexit(vm);#endif		vm_map_lock(&vm->vm_map);		if (vm->vm_map.nentries) {			uvm_unmap_remove(&vm->vm_map,			    vm->vm_map.min_offset, vm->vm_map.max_offset,			    &dead_entries);			if (dead_entries != NULL)				uvm_unmap_detach(dead_entries, 0);		}		pmap_destroy(vm->vm_map.pmap);		vm->vm_map.pmap = NULL;		pool_put(&uvm_vmspace_pool, vm);	}	UVMHIST_LOG(maphist,"<- done", 0,0,0,0);}