This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Alternate approach to keeping convenience variables
- From: Jim Blandy <jimb at red-bean dot com>
- To: Andrew STUBBS <andrew dot stubbs at st dot com>
- Cc: Daniel Jacobowitz <drow at false dot org>, gdb-patches at sources dot redhat dot com
- Date: Wed, 4 Jan 2006 09:00:51 -0800
- Subject: Re: [RFC] Alternate approach to keeping convenience variables
- References: <4381DC75.80800@st.com> <8f2776cb0511212138g2adef40cr1632365c00e3bebc@mail.gmail.com> <43835114.5060401@st.com> <20051209205923.GA21331@nevyn.them.org> <43BBBBC3.1010201@st.com>
On 1/4/06, Andrew STUBBS <andrew.stubbs@st.com> 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?