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!
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:39 UTC