Page MenuHomeFreeBSD

Eliminate one syscall from kinfo_getproc
ClosedPublic

Authored by emaste on May 6 2022, 4:46 PM.
Tags
None
Referenced Files
F160385645: D35140.id105757.diff
Tue, Jun 23, 11:59 PM
Unknown Object (File)
Tue, Jun 23, 11:59 AM
Unknown Object (File)
Sun, Jun 21, 10:39 PM
Unknown Object (File)
Sun, Jun 21, 1:04 PM
Unknown Object (File)
May 18 2026, 2:14 AM
Unknown Object (File)
May 11 2026, 11:52 PM
Unknown Object (File)
May 11 2026, 11:52 PM
Unknown Object (File)
May 11 2026, 11:52 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