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)
Tue, Dec 9, 6:34 AM
Unknown Object (File)
Nov 22 2025, 9:00 PM
Unknown Object (File)
Nov 21 2025, 9:21 AM
Unknown Object (File)
Nov 20 2025, 5:50 PM
Unknown Object (File)
Nov 18 2025, 7:16 AM
Unknown Object (File)
Nov 17 2025, 10:01 PM
Unknown Object (File)
Nov 16 2025, 6:35 PM
Unknown Object (File)
Nov 13 2025, 6:28 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