Page MenuHomeFreeBSD

Eliminate one syscall from kinfo_getproc
ClosedPublic

Authored by emaste on May 6 2022, 4:46 PM.
Tags
None
Referenced Files
F96309024: D35140.id105757.diff
Tue, Sep 24, 12:27 PM
F96299583: D35140.diff
Tue, Sep 24, 10:40 AM
Unknown Object (File)
Sat, Sep 21, 7:25 PM
Unknown Object (File)
Fri, Sep 6, 7:17 PM
Unknown Object (File)
Thu, Sep 5, 8:36 PM
Unknown Object (File)
Thu, Sep 5, 2:13 PM
Unknown Object (File)
Aug 3 2024, 10:23 PM
Unknown Object (File)
Jul 28 2024, 9:00 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