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, Jul 5, 6:15 PM
Unknown Object (File)
Sat, Jun 28, 12:52 PM
Unknown Object (File)
Thu, Jun 26, 12:50 AM
Unknown Object (File)
Fri, Jun 20, 7:24 PM
Unknown Object (File)
May 25 2025, 8:37 PM
Unknown Object (File)
May 25 2025, 3:54 AM
Unknown Object (File)
May 16 2025, 10:26 AM
Unknown Object (File)
May 12 2025, 4:05 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