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

Function sysctl_hw_usermem

freebsd/kern/kern_mib.c:229–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227 "Amount of memory (in bytes) reported by the firmware");
228
229static int
230sysctl_hw_usermem(SYSCTL_HANDLER_ARGS)
231{
232 u_long val, p, p1;
233
234 p1 = physmem - vm_wire_count();
235 p = SIZE_T_MAX >> PAGE_SHIFT;
236 if (p1 < p)
237 p = p1;
238 val = ctob(p);
239 return (sysctl_handle_long(oidp, &val, 0, req));
240}
241SYSCTL_PROC(_hw, HW_USERMEM, usermem,
242 CTLTYPE_ULONG | CTLFLAG_RD | CTLFLAG_MPSAFE, 0, 0,
243 sysctl_hw_usermem, "LU",

Callers

nothing calls this directly

Calls 2

vm_wire_countFunction · 0.85
sysctl_handle_longFunction · 0.85

Tested by

no test coverage detected