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

Function vm_object_zdtor

freebsd/vm/vm_object.c:178–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176static void vm_object_zdtor(void *mem, int size, void *arg);
177
178static void
179vm_object_zdtor(void *mem, int size, void *arg)
180{
181 vm_object_t object;
182
183 object = (vm_object_t)mem;
184 KASSERT(object->ref_count == 0,
185 ("object %p ref_count = %d", object, object->ref_count));
186 KASSERT(TAILQ_EMPTY(&object->memq),
187 ("object %p has resident pages in its memq", object));
188 KASSERT(vm_radix_is_empty(&object->rtree),
189 ("object %p has resident pages in its trie", object));
190#if VM_NRESERVLEVEL > 0
191 KASSERT(LIST_EMPTY(&object->rvq),
192 ("object %p has reservations",
193 object));
194#endif
195 KASSERT(!vm_object_busied(object),
196 ("object %p busy = %d", object, blockcount_read(&object->busy)));
197 KASSERT(object->resident_page_count == 0,
198 ("object %p resident_page_count = %d",
199 object, object->resident_page_count));
200 KASSERT(object->shadow_count == 0,
201 ("object %p shadow_count = %d",
202 object, object->shadow_count));
203 KASSERT(object->type == OBJT_DEAD,
204 ("object %p has non-dead type %d",
205 object, object->type));
206}
207#endif
208
209static int

Callers

nothing calls this directly

Calls 3

vm_radix_is_emptyFunction · 0.85
vm_object_busiedFunction · 0.85
blockcount_readFunction · 0.85

Tested by

no test coverage detected