From owner-cvs-all@FreeBSD.ORG Tue May 22 16:21:57 2007 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 78D2F16A469; Tue, 22 May 2007 16:21:57 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 3509A13C458; Tue, 22 May 2007 16:21:57 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l4MGKjtM060667; Tue, 22 May 2007 10:20:45 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 22 May 2007 10:20:45 -0600 (MDT) Message-Id: <20070522.102045.112563319.imp@bsdimp.com> To: rwatson@freebsd.org From: Warner Losh In-Reply-To: <20070522115750.J50138@fledge.watson.org> References: <200705211816.l4LIG5io091428@repoman.freebsd.org> <20070522164613.E5269@besplex.bde.org> <20070522115750.J50138@fledge.watson.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Tue, 22 May 2007 10:20:45 -0600 (MDT) Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, bde@optusnet.com.au Subject: Re: cvs commit: src/lib/libmemstat memstat_malloc.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: Tue, 22 May 2007 16:21:57 -0000 From: Robert Watson Subject: Re: cvs commit: src/lib/libmemstat memstat_malloc.c Date: Tue, 22 May 2007 11:58:19 +0100 (BST) > > On Tue, 22 May 2007, Bruce Evans wrote: > > > On Mon, 21 May 2007, Robert Watson wrote: > > > >> rwatson 2007-05-21 18:16:04 UTC > >> > >> FreeBSD src repository > >> > >> Modified files: > >> lib/libmemstat memstat_malloc.c > >> Log: > >> Make pointer argument to kread_string() const since the kernel structure > >> field is const, and then employ __DECONST before getting into the kvm > >> code. This eliminates a gcc 4.2 warning about losing constification. > >> > >> __DECONST advice from: sam > > > > Should know better than to use __DECONST: C programmers. Zen Master bde hits. You are confused. You are Dazed.--More-- You have received enlightment. Welcome to level 34583. > This basically trickles up from libkvm, which presumably also wants to be > const-poisoned. Yes. Const poisoning is a post-order call graph traversal excersize. However, given the size of our call graphs, and their complexity, there are practical issues. In const-poisoning large systems, often times one needs to use half-measures, and bogosities like __DECONST to make progress. Warner