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, Jul 13, 6:45 AM
Unknown Object (File)
Sat, Jul 11, 12:23 AM
Unknown Object (File)
Sat, Jul 4, 4:06 PM
Unknown Object (File)
Sun, Jun 28, 10:58 PM
Unknown Object (File)
Thu, Jun 25, 3:21 AM
Unknown Object (File)
Tue, Jun 23, 11:59 PM
Unknown Object (File)
Tue, Jun 23, 11:59 AM
Unknown Object (File)
Sun, Jun 21, 10: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