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

Function max_order

freebsd/vm/vm_phys.c:1126–1139  ·  view source on GitHub ↗

* Return the largest possible order of a set of pages starting at m. */

Source from the content-addressed store, hash-verified

1124 * Return the largest possible order of a set of pages starting at m.
1125 */
1126static int
1127max_order(vm_page_t m)
1128{
1129
1130 /*
1131 * Unsigned "min" is used here so that "order" is assigned
1132 * "VM_NFREEORDER - 1" when "m"'s physical address is zero
1133 * or the low-order bits of its physical address are zero
1134 * because the size of a physical address exceeds the size of
1135 * a long.
1136 */
1137 return (min(ffsl(VM_PAGE_TO_PHYS(m) >> PAGE_SHIFT) - 1,
1138 VM_NFREEORDER - 1));
1139}
1140
1141/*
1142 * Free a contiguous, arbitrarily sized set of physical pages, without

Callers 2

vm_phys_enqueue_contigFunction · 0.85
vm_phys_free_contigFunction · 0.85

Calls 2

minFunction · 0.85
ffslFunction · 0.50

Tested by

no test coverage detected