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

Function vm_phys_avail_check

freebsd/vm/vm_phys.c:1512–1524  ·  view source on GitHub ↗

* Assert that a phys_avail entry is valid. */

Source from the content-addressed store, hash-verified

1510 * Assert that a phys_avail entry is valid.
1511 */
1512static void
1513vm_phys_avail_check(int i)
1514{
1515 if (phys_avail[i] & PAGE_MASK)
1516 panic("Unaligned phys_avail[%d]: %#jx", i,
1517 (intmax_t)phys_avail[i]);
1518 if (phys_avail[i+1] & PAGE_MASK)
1519 panic("Unaligned phys_avail[%d + 1]: %#jx", i,
1520 (intmax_t)phys_avail[i]);
1521 if (phys_avail[i + 1] < phys_avail[i])
1522 panic("phys_avail[%d] start %#jx < end %#jx", i,
1523 (intmax_t)phys_avail[i], (intmax_t)phys_avail[i+1]);
1524}
1525
1526/*
1527 * Return the index of an overlapping phys_avail entry or -1.

Callers 2

vm_phys_avail_splitFunction · 0.85
vm_phys_early_allocFunction · 0.85

Calls 1

panicFunction · 0.50

Tested by

no test coverage detected