cvs commit: src/sys/kern kern_malloc.c
Pawel Jakub Dawidek
pjd at FreeBSD.org
Wed Jul 27 23:17:32 GMT 2005
pjd 2005-07-27 23:17:31 UTC
FreeBSD src repository
Modified files:
sys/kern kern_malloc.c
Log:
Fix the way how "InUse" column in 'vmstat -m' output works:
- increase number of allocations count only on successfull malloc(9),
so it doesn't confuse people;
- because we need to check if 'size > 0', hide 'mtsp->mts_memalloced += size;'
under the check as well, as for size=0 it is of course a no-op;
- avoid critical_enter()/critical_exit() in case of failure in
malloc_type_allocated() as there will be nothing to do.
OK'ed by: rwatson
MFC after: 2 days
Revision Changes Path
1.145 +6 -3 src/sys/kern/kern_malloc.c
More information about the cvs-src
mailing list