Date: Mon, 29 Dec 2003 00:25:32 -0800 (PST) From: Bruce Evans <bde@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/usr.bin/netstat mbuf.c Message-ID: <200312290825.hBT8PW6o014328@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
bde 2003/12/29 00:25:32 PST FreeBSD src repository Modified files: usr.bin/netstat mbuf.c Log: Use floating point instead of unsigned long longs in percentage calculations. Long longs should never be used, since they break compiling with C90 compilers and don't necessarily work any better than longs for avoiding overflow. Print percentages with another digit of precision since they can be small and this is easy to do now that the format is floating point. Restored some more of the old -m output: Print the percentage of allocated memory that is in use. This is the amount of memory in active mbufs and mbuf clusters relative to the total amount of memory soft-allocated for mbufs and mbuf clusters. Print the percentage of allocated memory that is wired (cached). The old mbuf allocator never freed memory so printing this value wasn't useful. A previous version of netstat for the new allocator printed the in-use amount as a percentage of the wired amount. Fixed some nearby style bugs (excessive parenthesization and a redundant return). Reviewed by: alfred Revision Changes Path 1.39 +13 -13 src/usr.bin/netstat/mbuf.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200312290825.hBT8PW6o014328>