Page MenuHomeFreeBSD

Eliminate one syscall from kinfo_getproc
ClosedPublic

Authored by emaste on May 6 2022, 4:46 PM.
Tags
None
Referenced Files
F115257352: D35140.id105741.diff
Mon, Apr 21, 10:54 PM
Unknown Object (File)
Sat, Apr 19, 6:16 AM
Unknown Object (File)
Thu, Apr 17, 5:43 PM
Unknown Object (File)
Sat, Apr 12, 7:40 PM
Unknown Object (File)
Feb 23 2025, 5:08 AM
Unknown Object (File)
Feb 22 2025, 1:38 PM
Unknown Object (File)
Feb 21 2025, 4:22 PM
Unknown Object (File)
Feb 21 2025, 3:40 PM
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