Page MenuHomeFreeBSD

Eliminate one syscall from kinfo_getproc
ClosedPublic

Authored by emaste on May 6 2022, 4:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Feb 14, 4:44 PM
Unknown Object (File)
Tue, Feb 10, 11:38 PM
Unknown Object (File)
Sun, Feb 8, 2:11 AM
Unknown Object (File)
Sat, Feb 7, 6:45 PM
Unknown Object (File)
Fri, Jan 30, 9:16 PM
Unknown Object (File)
Fri, Jan 30, 4:23 AM
Unknown Object (File)
Fri, Jan 30, 4:23 AM
Unknown Object (File)
Dec 9 2025, 6:34 AM
Subscribers

Details

Summary

Previously we invoked the sysctl with a NULL buffer to query the size, allocated a buffer, then invoked it again to fetch the data.

As we only handle the case where the sysctl provides data of the expected size we can just allocate a correctly-sized buffer to begin with.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable