* vm_object_destroy removes the object from the global object list * and frees the space for the object. */
| 694 | * and frees the space for the object. |
| 695 | */ |
| 696 | void |
| 697 | vm_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 | |
| 716 | static void |
| 717 | vm_object_backing_remove_locked(vm_object_t object) |
no test coverage detected