Page MenuHomeFreeBSD

Eliminate one syscall from kinfo_getproc
ClosedPublic

Authored by emaste on May 6 2022, 4:46 PM.
Tags
None
Referenced Files
F81615116: D35140.id105757.diff
Fri, Apr 19, 12:18 AM
Unknown Object (File)
Fri, Mar 22, 12:07 PM
Unknown Object (File)
Mar 8 2024, 7:56 AM
Unknown Object (File)
Mar 8 2024, 7:56 AM
Unknown Object (File)
Mar 8 2024, 7:44 AM
Unknown Object (File)
Feb 24 2024, 7:38 AM
Unknown Object (File)
Jan 14 2024, 10:37 AM
Unknown Object (File)
Jan 5 2024, 5:41 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