malloc(9) statistics.

From: Pawel Jakub Dawidek <pjd_at_FreeBSD.org>
Date: Wed, 27 Jul 2005 19:51:58 +0200
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.

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd_at_FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

Received on Wed Jul 27 2005 - 15:52:01 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:39 UTC