Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jul 2005 06:14:57 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/kern kern_malloc.c
Message-ID:  <200507300614.j6U6Evto036040@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507300614.j6U6Evto036040>