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

Function startup_free

freebsd/vm/uma_core.c:1689–1712  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1687}
1688
1689static void
1690startup_free(void *mem, vm_size_t bytes)
1691{
1692 vm_offset_t va;
1693 vm_page_t m;
1694
1695 va = (vm_offset_t)mem;
1696 m = PHYS_TO_VM_PAGE(pmap_kextract(va));
1697
1698 /*
1699 * startup_alloc() returns direct-mapped slabs on some platforms. Avoid
1700 * unmapping ranges of the direct map.
1701 */
1702 if (va >= bootstart && va + bytes <= bootmem)
1703 pmap_remove(kernel_pmap, va, va + bytes);
1704 for (; bytes != 0; bytes -= PAGE_SIZE, m++) {
1705#if defined(__aarch64__) || defined(__amd64__) || defined(__mips__) || \
1706 defined(__riscv) || defined(__powerpc64__)
1707 dump_drop_page(VM_PAGE_TO_PHYS(m));
1708#endif
1709 vm_page_unwire_noq(m);
1710 vm_page_free(m);
1711 }
1712}
1713#endif
1714
1715/*

Callers 2

page_freeFunction · 0.85
pcpu_page_freeFunction · 0.85

Calls 7

PHYS_TO_VM_PAGEFunction · 0.85
dump_drop_pageFunction · 0.85
vm_page_unwire_noqFunction · 0.85
vm_page_freeFunction · 0.85
kmem_freeFunction · 0.70
pmap_kextractFunction · 0.50
pmap_removeFunction · 0.50

Tested by

no test coverage detected