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, Nov 9, 6:57 PM
Unknown Object (File)
Mon, Oct 21, 4:51 PM
Unknown Object (File)
Oct 5 2024, 12:43 PM
Unknown Object (File)
Oct 4 2024, 8:27 PM
Unknown Object (File)
Oct 4 2024, 4:06 AM
Unknown Object (File)
Oct 4 2024, 12:55 AM
Unknown Object (File)
Oct 3 2024, 7:08 PM
Unknown Object (File)
Oct 1 2024, 5:39 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