From owner-cvs-all@FreeBSD.ORG Mon Aug 1 13:18:21 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D405816A41F; Mon, 1 Aug 2005 13:18:21 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9520643D49; Mon, 1 Aug 2005 13:18:21 +0000 (GMT) (envelope-from rwatson@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 j71DILPj088932; Mon, 1 Aug 2005 13:18:21 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j71DIL6T088931; Mon, 1 Aug 2005 13:18:21 GMT (envelope-from rwatson) Message-Id: <200508011318.j71DIL6T088931@repoman.freebsd.org> From: Robert Watson Date: Mon, 1 Aug 2005 13:18:21 +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/lib/libmemstat memstat.c memstat_internal.h memstat_malloc.c memstat_uma.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2005 13:18:22 -0000 rwatson 2005-08-01 13:18:21 UTC FreeBSD src repository Modified files: lib/libmemstat memstat.c memstat_internal.h memstat_malloc.c memstat_uma.c Log: Correct two libmemstat(3) bugs: - Move memory_type_list flushing logic from memstat_mtl_free() to _memstat_mtl_empty(), a libmemstat-internal function that can be called from other parts of the library. Invoke _memstat_mtl_empty() from memstat_mtl_free(), which also frees the containing list structure. Invoke _memstat_mtl_empty() instead of memstat_mtl_free() in various error cases in memstat_malloc.c and memstat_uma.c, which previously resulted in the list being freed prematurely. - Reverse the order of updating the mt_kegfree and mt_free fields of the memory_type in memstat_uma.c, otherwise keg free items won't be counted properly for non-secondary zones. MFC after: 3 days Revision Changes Path 1.6 +8 -1 src/lib/libmemstat/memstat.c 1.6 +1 -0 src/lib/libmemstat/memstat_internal.h 1.5 +1 -1 src/lib/libmemstat/memstat_malloc.c 1.9 +2 -2 src/lib/libmemstat/memstat_uma.c