From owner-freebsd-current Fri Aug 7 10:14:34 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA10111 for freebsd-current-outgoing; Fri, 7 Aug 1998 10:14:34 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA10068 for ; Fri, 7 Aug 1998 10:14:21 -0700 (PDT) (envelope-from archie@whistle.com) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id KAA05649; Fri, 7 Aug 1998 10:13:14 -0700 (PDT) Received: from bubba.whistle.com(207.76.205.7) by whistle.com via smap (V1.3) id sma005645; Fri Aug 7 10:12:48 1998 Received: (from archie@localhost) by bubba.whistle.com (8.8.7/8.6.12) id KAA29716; Fri, 7 Aug 1998 10:12:48 -0700 (PDT) From: Archie Cobbs Message-Id: <199808071712.KAA29716@bubba.whistle.com> Subject: Re: memory leaks in libc In-Reply-To: <199808070332.XAA17093@khavrinen.lcs.mit.edu> from Garrett Wollman at "Aug 6, 98 11:32:21 pm" To: wollman@khavrinen.lcs.mit.edu (Garrett Wollman) Date: Fri, 7 Aug 1998 10:12:48 -0700 (PDT) Cc: archie@whistle.com, freebsd-current@FreeBSD.ORG, bde@zeta.org.au, wollman@khavrinen.lcs.mit.edu, dg@root.com X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Garrett Wollman writes: > >> malloc() is simple enough. It would solve the problem for programs > >> than need it (a real world example of which exists at Whistle). > > > OK, just to prove I'm not lazy... try this. > > Now having gone to that effort, you can just add it to your program > that needs it, and we don't have to bear the kluge in the C library. I just don't understand where you're coming from. There is a clear bug in the standard library, we agree on this right? You are saying that it's not worth fixing, because... - The cost is too high? I disagree, it's easy to fix and I've done it for you. The space increase is negligible, and the time increase is negligible, unless your program does a lot of environment operations, in which case you already have a bigger problem: a built-in memory leak! - Because no program you've ever written suffers from the bug? Others have encountered it in real programs. - It's a kludge? The kludge nature of this whole problem is already inherited from the "environ" variable semantics. There's nothing kludgey about the bug fix, other than that it takes one kludge to undo the negative effects (memory leak) of an existing kludge. > I believe that any program which suffers serious harm from the memory > leak probably needs to use a different environment-access model. Yes, until we fix the bug. Then they don't anymore, that's the whole point. -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message