Date: Sun, 20 Jun 2004 21:25:10 +0000 (UTC) From: Garance A Drosehn <gad@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/bin/ps ps.c ps.h Message-ID: <200406202125.i5KLPAFF072469@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
gad 2004-06-20 21:25:10 UTC FreeBSD src repository Modified files: bin/ps ps.c ps.h Log: Have the main() routine calculate %CPU and (if needed) memory information when copying per-process info before starting to sort the list. This way, sort-by-CPU or sort-by-memory will only calculate values once-per-process, instead of twice-per-comparison. Also take advantage of this to simplify the pscomp() routine. Revision Changes Path 1.99 +29 -36 src/bin/ps/ps.c 1.18 +2 -0 src/bin/ps/ps.h
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406202125.i5KLPAFF072469>