freebsd-src/lib/libutil
Ed Maste 904c148f1c libutil: eliminate one syscall from kinfo_getproc
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.

Reported by:	Thomas Hurst via Twitter
Reviewed by:	kevans
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D35140
2022-05-06 20:06:09 -04:00
..
tests
_secure_path.3
_secure_path.c
auth.c
expand_number.3
expand_number.c
flopen.3
flopen.c
fparseln.3
fparseln.c
getlocalbase.3
getlocalbase.c
gr_util.c
hexdump.3
hexdump.c
humanize_number.3
humanize_number.c
kinfo_getallproc.3
kinfo_getallproc.c
kinfo_getfile.3
kinfo_getfile.c
kinfo_getproc.3
kinfo_getproc.c libutil: eliminate one syscall from kinfo_getproc 2022-05-06 20:06:09 -04:00
kinfo_getvmmap.3
kinfo_getvmmap.c
kinfo_getvmobject.3
kinfo_getvmobject.c libutil: add kinfo_getswapvmobject(3) 2021-10-26 15:50:29 +03:00
kld.3
kld.c
libutil.h pidfile: add pidfile_signal 2022-04-09 15:59:43 +00:00
login.conf.5
login_auth.3
login_auth.c
login_cap.3
login_cap.c
login_cap.h
login_class.3
login_class.c
login_crypt.c
login_ok.3
login_ok.c
login_times.3
login_times.c
login_tty.3
login_tty.c
Makefile
Makefile.depend
pidfile.3
pidfile.c pidfile: add pidfile_signal 2022-04-09 15:59:43 +00:00
property.3
property.c
pty.3
pty.c
pw_util.3
pw_util.c
quotafile.3
quotafile.c
realhostname.3
realhostname.c
realhostname_sa.3
stub.c
trimdomain.3
trimdomain.c
uucplock.3
uucplock.c