From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5966 invoked by alias); 4 Jan 2006 17:00:56 -0000 Received: (qmail 5959 invoked by uid 22791); 4 Jan 2006 17:00:55 -0000 X-Spam-Check-By: sourceware.org Received: from zproxy.gmail.com (HELO zproxy.gmail.com) (64.233.162.205) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 04 Jan 2006 17:00:53 +0000 Received: by zproxy.gmail.com with SMTP id l1so3017332nzf for ; Wed, 04 Jan 2006 09:00:52 -0800 (PST) Received: by 10.37.20.33 with SMTP id x33mr5669337nzi; Wed, 04 Jan 2006 09:00:51 -0800 (PST) Received: by 10.37.2.42 with HTTP; Wed, 4 Jan 2006 09:00:51 -0800 (PST) Message-ID: <8f2776cb0601040900t6e821db5v96a2cd0ef35c53f0@mail.gmail.com> Date: Wed, 04 Jan 2006 17:00:00 -0000 From: Jim Blandy To: Andrew STUBBS Subject: Re: [RFC] Alternate approach to keeping convenience variables Cc: Daniel Jacobowitz , gdb-patches@sources.redhat.com In-Reply-To: <43BBBBC3.1010201@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <4381DC75.80800@st.com> <8f2776cb0511212138g2adef40cr1632365c00e3bebc@mail.gmail.com> <43835114.5060401@st.com> <20051209205923.GA21331@nevyn.them.org> <43BBBBC3.1010201@st.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00041.txt.bz2 On 1/4/06, Andrew STUBBS wrote: > One point though - why is it ok to leak the memory? This seems like bad > practice to me - I mean, types can be arbitrarily large and, even if > they are typically small, the variables may be rewritten many many times > (particularly by scripts with loops). Are you saying that they will be > actually leaked or just left for some sort of garbage collection? No, it'll really be leaked. But the leakage only occurs when symbol files get unloaded from memory, so it would only affect scripts that load and unload symbol files in a loop. I agree it's not optimal, but I think the alternative is GC. Maybe we should think about that. Has anyone ever tried running GDB using the Boehm collector's replacements for malloc and free?