cvs commit: src/lib/libmemstat memstat_malloc.c
Warner Losh
imp at bsdimp.com
Tue May 22 16:21:57 UTC 2007
From: Robert Watson <rwatson at FreeBSD.org>
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
More information about the cvs-all
mailing list