sys/vm/vm_vmspace.c
static
void
vmspace_entry_delete(struct vmspace_entry *ve, struct vkernel_proc *vkp)
{
	RB_REMOVE(vmspace_rb_tree, &vkp->root, ve);

	pmap_remove_pages(vmspace_pmap(ve->vmspace),
			  VM_MIN_USER_ADDRESS, VM_MAX_USER_ADDRESS);
	vm_map_remove(&ve->vmspace->vm_map,
		      VM_MIN_USER_ADDRESS, VM_MAX_USER_ADDRESS);
	vmspace_free(ve->vmspace);
	ve->vmspace = NULL; /* safety */
	kfree(ve, M_VKERNEL);
}
/*
 * Remove a vmspace_entry from the RB tree and destroy it.  We have to clean
 * up the pmap, the vm_map, then destroy the vmspace.
 *
 * This function must remove the ve immediately before it might potentially
 * block.
 *
 * The caller must hold vkp->token.
 */
Remove a vmspace_entry from the RB tree and destroy it.  We have to clean
up the pmap, the vm_map, then destroy the vmspace.

This function must remove the ve immediately before it might potentially
block.

The caller must hold vkp->token.
Remove a vmspace_entry from the RB tree and destroy it . We have to clean up the pmap the vm_map then destroy the vmspace . This function must remove the ve immediately before it might potentially block . The caller must hold vkp - > token .
static
void
vmspace_entry_delete(struct vmspace_entry *ve, struct vkernel_proc *vkp)
{
	RB_REMOVE(vmspace_rb_tree, &vkp->root, ve);
	pmap_remove_pages(vmspace_pmap(ve->vmspace),
			  VM_MIN_USER_ADDRESS, VM_MAX_USER_ADDRESS);
	vm_map_remove(&ve->vmspace->vm_map,
		      VM_MIN_USER_ADDRESS, VM_MAX_USER_ADDRESS);
	vmspace_free(ve->vmspace);
	ve->vmspace = NULL; 
	kfree(ve, M_VKERNEL);
}
static void vmspace_entry_delete ( struct vmspace_entry * ve , struct vkernel_proc * vkp ) { RB_REMOVE ( vmspace_rb_tree , & vkp -> root , ve ) ; pmap_remove_pages ( vmspace_pmap ( ve -> vmspace ) , VM_MIN_USER_ADDRESS , VM_MAX_USER_ADDRESS ) ; vm_map_remove ( & ve -> vmspace -> vm_map , VM_MIN_USER_ADDRESS , VM_MAX_USER_ADDRESS ) ; vmspace_free ( ve -> vmspace ) ; ve -> vmspace = NULL ; kfree ( ve , M_VKERNEL ) ; }
Remove a vmspace_entry from the RB tree and destroy it.
Remove a vmspace_entry from the RB tree and destroy it .
/* safety */