From owner-cvs-src@FreeBSD.ORG Wed Jul 27 23:17:32 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 52ABB16A41F; Wed, 27 Jul 2005 23:17:32 +0000 (GMT) (envelope-from pjd@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F1B043D46; Wed, 27 Jul 2005 23:17:31 +0000 (GMT) (envelope-from pjd@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j6RNHVWB086994; Wed, 27 Jul 2005 23:17:31 GMT (envelope-from pjd@repoman.freebsd.org) Received: (from pjd@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j6RNHVHb086993; Wed, 27 Jul 2005 23:17:31 GMT (envelope-from pjd) Message-Id: <200507272317.j6RNHVHb086993@repoman.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 27 Jul 2005 23:17:31 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/kern kern_malloc.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2005 23:17:32 -0000 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