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

Function vm_page_alloc_check

freebsd/vm/vm_page.c:2403–2419  ·  view source on GitHub ↗

* Check a page that has been freshly dequeued from a freelist. */

Source from the content-addressed store, hash-verified

2401 * Check a page that has been freshly dequeued from a freelist.
2402 */
2403static void
2404vm_page_alloc_check(vm_page_t m)
2405{
2406
2407 KASSERT(m->object == NULL, ("page %p has object", m));
2408 KASSERT(m->a.queue == PQ_NONE &&
2409 (m->a.flags & PGA_QUEUE_STATE_MASK) == 0,
2410 ("page %p has unexpected queue %d, flags %#x",
2411 m, m->a.queue, (m->a.flags & PGA_QUEUE_STATE_MASK)));
2412 KASSERT(m->ref_count == 0, ("page %p has references", m));
2413 KASSERT(vm_page_busy_freed(m), ("page %p is not freed", m));
2414 KASSERT(m->dirty == 0, ("page %p is dirty", m));
2415 KASSERT(pmap_page_get_memattr(m) == VM_MEMATTR_DEFAULT,
2416 ("page %p has unexpected memattr %d",
2417 m, pmap_page_get_memattr(m)));
2418 KASSERT(m->valid == 0, ("free page %p is valid", m));
2419}
2420
2421/*
2422 * vm_page_alloc_freelist:

Callers 3

Calls

no outgoing calls

Tested by

no test coverage detected