cvs commit: src/sys/kern kern_malloc.c

Pawel Jakub Dawidek pjd at FreeBSD.org
Sat Jul 30 06:14:58 GMT 2005


pjd         2005-07-30 06:14:57 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_6)
    sys/kern             kern_malloc.c 
  Log:
  MFC:    kern_malloc.c   1.145
  
  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
  Approved by:    re (kensmith)
  
  Revision   Changes    Path
  1.142.2.2  +6 -3      src/sys/kern/kern_malloc.c


More information about the cvs-src mailing list