This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Value reference counting
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at redhat dot com>, Vladimir Prus <vladimir at codesourcery dot com>
- Date: Tue, 21 Jul 2009 14:13:37 -0400
- Subject: Re: Value reference counting
- References: <20090717184152.GA6863@caradoc.them.org>
On Fri, Jul 17, 2009 at 02:41:53PM -0400, Daniel Jacobowitz wrote:
> This patch, based on an old patch from Vladimir, implements reference
> counting for values. Tom, this is the approach I discussed with you
> on IRC: instead of treating the value chain as a normal reference and
> using release_value to take references, this separates the value chain
> (which is boolean; a value is either on it or not) from references
> (which are counted). So you take a reference with value_incref.
> release_value transforms the value chain's reference into a normal
> reference. That's an entirely theoretical operation, by which I mean
> release_value doesn't have to do anything special.
>
> Does this look OK? Tom, will it work for the Python code?
>
> Tested on x86_64-linux, no regressions.
I've checked this in with the revised comment. The long-lived memory
usage issues Thiago commented on aren't related particularly to this
patch.
--
Daniel Jacobowitz
CodeSourcery