Changeset View
Changeset View
Standalone View
Standalone View
head/sys/vm/vm_object.c
Show First 20 Lines • Show All 759 Lines • ▼ Show 20 Lines | TAILQ_FOREACH_SAFE(p, &object->memq, listq, p_next) { | ||||
* its "object" field. Specifically, if the page is not | * its "object" field. Specifically, if the page is not | ||||
* wired, then the effect of this assignment is that | * wired, then the effect of this assignment is that | ||||
* vm_page_free()'s call to vm_page_remove() will return | * vm_page_free()'s call to vm_page_remove() will return | ||||
* immediately without modifying the page or the object. | * immediately without modifying the page or the object. | ||||
*/ | */ | ||||
p->object = NULL; | p->object = NULL; | ||||
if (p->wire_count == 0) { | if (p->wire_count == 0) { | ||||
vm_page_free(p); | vm_page_free(p); | ||||
PCPU_INC(cnt.v_pfree); | VM_CNT_INC(v_pfree); | ||||
} | } | ||||
vm_page_unlock(p); | vm_page_unlock(p); | ||||
} | } | ||||
/* | /* | ||||
* If the object contained any pages, then reset it to an empty state. | * If the object contained any pages, then reset it to an empty state. | ||||
* None of the object's fields, including "resident_page_count", were | * None of the object's fields, including "resident_page_count", were | ||||
* modified by the preceding loop. | * modified by the preceding loop. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 1,868 Lines • Show Last 20 Lines |