Page MenuHomeFreeBSD

Eliminate one syscall from kinfo_getproc
ClosedPublic

Authored by emaste on May 6 2022, 4:46 PM.
Tags
None
Referenced Files
F166112622: D35140.id105741.diff
Tue, Aug 11, 8:03 PM
F166014813: D35140.id105757.diff
Tue, Aug 11, 1:29 AM
Unknown Object (File)
Sat, Aug 8, 4:21 PM
Unknown Object (File)
Sat, Aug 8, 8:44 AM
Unknown Object (File)
Fri, Aug 7, 10:09 PM
Unknown Object (File)
Thu, Aug 6, 12:53 AM
Unknown Object (File)
Sat, Jul 18, 5:21 AM
Unknown Object (File)
Mon, Jul 13, 6:45 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