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

Function sg_pager_dealloc

freebsd/vm/sg_pager.c:122–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122static void
123sg_pager_dealloc(vm_object_t object)
124{
125 struct sglist *sg;
126 vm_page_t m;
127
128 /*
129 * Free up our fake pages.
130 */
131 while ((m = TAILQ_FIRST(&object->un_pager.sgp.sgp_pglist)) != 0) {
132 if (vm_page_busy_acquire(m, VM_ALLOC_WAITFAIL) == 0)
133 continue;
134 TAILQ_REMOVE(&object->un_pager.sgp.sgp_pglist, m, plinks.q);
135 vm_page_putfake(m);
136 }
137
138 sg = object->handle;
139 sglist_free(sg);
140 object->handle = NULL;
141 object->type = OBJT_DEAD;
142}
143
144static int
145sg_pager_getpages(vm_object_t object, vm_page_t *m, int count, int *rbehind,

Callers

nothing calls this directly

Calls 3

vm_page_busy_acquireFunction · 0.85
vm_page_putfakeFunction · 0.85
sglist_freeFunction · 0.85

Tested by

no test coverage detected