Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/vm_object.c
| Show First 20 Lines • Show All 889 Lines • ▼ Show 20 Lines | vm_object_terminate_single_page(vm_page_t p, void *objectv) | ||||
| vm_object_t object __diagused = objectv; | vm_object_t object __diagused = objectv; | ||||
| vm_page_assert_unbusied(p); | vm_page_assert_unbusied(p); | ||||
| KASSERT(p->object == object && | KASSERT(p->object == object && | ||||
| (p->ref_count & VPRC_OBJREF) != 0, | (p->ref_count & VPRC_OBJREF) != 0, | ||||
| ("%s: page %p is inconsistent", __func__, p)); | ("%s: page %p is inconsistent", __func__, p)); | ||||
| p->object = NULL; | p->object = NULL; | ||||
| if (vm_page_drop(p, VPRC_OBJREF) == VPRC_OBJREF) { | if (vm_page_drop(p, VPRC_OBJREF) == VPRC_OBJREF) { | ||||
| KASSERT((object->flags & OBJ_UNMANAGED) != 0 || | |||||
| vm_page_astate_load(p).queue != PQ_NONE, | |||||
| ("%s: page %p does not belong to a queue", __func__, p)); | |||||
| VM_CNT_INC(v_pfree); | VM_CNT_INC(v_pfree); | ||||
| vm_page_free(p); | vm_page_free(p); | ||||
| } | } | ||||
| } | } | ||||
| /* | /* | ||||
| * vm_object_terminate_pages removes any remaining pageable pages | * vm_object_terminate_pages removes any remaining pageable pages | ||||
| * from the object and resets the object to an empty state. | * from the object and resets the object to an empty state. | ||||
| ▲ Show 20 Lines • Show All 1,984 Lines • Show Last 20 Lines | |||||