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

Function pmap_release

freebsd/mips/mips/pmap.c:1274–1289  ·  view source on GitHub ↗

* Release any resources held by the given physical map. * Called when a pmap initialized by pmap_pinit is being released. * Should only be called if the map contains no valid mappings. */

Source from the content-addressed store, hash-verified

1272 * Should only be called if the map contains no valid mappings.
1273 */
1274void
1275pmap_release(pmap_t pmap)
1276{
1277 vm_offset_t ptdva;
1278 vm_page_t ptdpg;
1279
1280 KASSERT(pmap->pm_stats.resident_count == 0,
1281 ("pmap_release: pmap resident count %ld != 0",
1282 pmap->pm_stats.resident_count));
1283
1284 ptdva = (vm_offset_t)pmap->pm_segtab;
1285 ptdpg = PHYS_TO_VM_PAGE(MIPS_DIRECT_TO_PHYS(ptdva));
1286
1287 vm_page_unwire_noq(ptdpg);
1288 vm_page_free_zero(ptdpg);
1289}
1290
1291/*
1292 * grow the number of kernel page table entries, if needed

Callers 1

vmspace_dofreeFunction · 0.50

Calls 3

PHYS_TO_VM_PAGEFunction · 0.85
vm_page_unwire_noqFunction · 0.85
vm_page_free_zeroFunction · 0.85

Tested by

no test coverage detected