MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vm_object_destroy

Function vm_object_destroy

freebsd/vm/vm_object.c:696–714  ·  view source on GitHub ↗

* vm_object_destroy removes the object from the global object list * and frees the space for the object. */

Source from the content-addressed store, hash-verified

694 * and frees the space for the object.
695 */
696void
697vm_object_destroy(vm_object_t object)
698{
699
700 /*
701 * Release the allocation charge.
702 */
703 if (object->cred != NULL) {
704 swap_release_by_cred(object->charge, object->cred);
705 object->charge = 0;
706 crfree(object->cred);
707 object->cred = NULL;
708 }
709
710 /*
711 * Free the space for the object.
712 */
713 uma_zfree(obj_zone, object);
714}
715
716static void
717vm_object_backing_remove_locked(vm_object_t object)

Callers 2

vm_object_terminateFunction · 0.85
vnode_pager_allocFunction · 0.85

Calls 3

swap_release_by_credFunction · 0.85
uma_zfreeFunction · 0.70
crfreeFunction · 0.50

Tested by

no test coverage detected