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)
Mon, Jan 6, 4:35 PM
Unknown Object (File)
Mon, Dec 30, 2:43 AM
Unknown Object (File)
Fri, Dec 27, 7:30 AM
Unknown Object (File)
Wed, Dec 25, 8:44 AM
Unknown Object (File)
Dec 21 2024, 10:22 AM
Unknown Object (File)
Nov 14 2024, 12:51 AM
Unknown Object (File)
Nov 9 2024, 6:57 PM
Unknown Object (File)
Oct 21 2024, 4:51 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