Changeset View
Changeset View
Standalone View
Standalone View
head/sys/vm/vm_pageout.c
Show First 20 Lines • Show All 1,777 Lines • ▼ Show 20 Lines | vm_pageout_oom_pagecount(struct vmspace *vmspace) | ||||
vm_map_entry_t entry; | vm_map_entry_t entry; | ||||
vm_object_t obj; | vm_object_t obj; | ||||
long res; | long res; | ||||
map = &vmspace->vm_map; | map = &vmspace->vm_map; | ||||
KASSERT(!map->system_map, ("system map")); | KASSERT(!map->system_map, ("system map")); | ||||
sx_assert(&map->lock, SA_LOCKED); | sx_assert(&map->lock, SA_LOCKED); | ||||
res = 0; | res = 0; | ||||
for (entry = map->header.next; entry != &map->header; | VM_MAP_ENTRY_FOREACH(entry, map) { | ||||
entry = entry->next) { | |||||
if ((entry->eflags & MAP_ENTRY_IS_SUB_MAP) != 0) | if ((entry->eflags & MAP_ENTRY_IS_SUB_MAP) != 0) | ||||
continue; | continue; | ||||
obj = entry->object.vm_object; | obj = entry->object.vm_object; | ||||
if (obj == NULL) | if (obj == NULL) | ||||
continue; | continue; | ||||
if ((entry->eflags & MAP_ENTRY_NEEDS_COPY) != 0 && | if ((entry->eflags & MAP_ENTRY_NEEDS_COPY) != 0 && | ||||
obj->ref_count != 1) | obj->ref_count != 1) | ||||
continue; | continue; | ||||
▲ Show 20 Lines • Show All 422 Lines • Show Last 20 Lines |