This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Value reference counting


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]