malloc(9) statistics.
Pawel Jakub Dawidek
pjd at FreeBSD.org
Wed Jul 27 17:52:01 GMT 2005
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!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20050727/10266c89/attachment.bin
More information about the freebsd-current
mailing list