Date: Wed, 27 Jul 2005 19:51:58 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: freebsd-current@freebsd.org Subject: malloc(9) statistics. Message-ID: <20050727175158.GP46538@darkness.comp.waw.pl>
next in thread | raw e-mail | index | archive | help
--aWJO9/nTw6Gaxdug Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi. I spend few hours today tracking memory leak. At the end I found, that there were no memory leak actually, but memory statistics are confusing. Command 'vmstat -m' shows number of allocations in column named "InUse". Coulmn name is wrong and confusing. The column only shows how many allocation were there (successful or not), so when malloc(..., M_NOWAIT) fails, it increases InUse value, which is never decreased, because there will be no corresponding free(9). I've two proposals: 1. Don't increase allocations counter on failure: http://people.freebsd.org/~pjd/patches/kern_malloc.c.patch 2. Change "InUse" name to something else. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --aWJO9/nTw6Gaxdug Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFC58m+ForvXbEpPzQRAt78AKDuVGRT/vpzb4CVitiou0cIqYRICwCeNopl pHVJR9Pt3dR4crHvK2cGbtU= =c4kW -----END PGP SIGNATURE----- --aWJO9/nTw6Gaxdug--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050727175158.GP46538>