Re: [Fresco-devel] ref counting

Nathaniel Smith <[email protected]>
Newsgroups gmane.comp.video.fresco.devel
Message-ID <[email protected]>
On Wed, Oct 30, 2002 at 02:07:21PM -0500, Sean Rae wrote:
> Just a thought from someone who knows programming but doesn't know
> CORBA... Would there be a way to have something in the same stadium as a
> garbage collector except that it tracks allocations instead of lifetime?
> It could tell the programmer when there are extra objects laying around
> that need to be dealt with.  That way, this debugging feature could be
> used to watch the memory allocation (and any leaks) of the program by
> totalling the current objects that should be in memory compared to the
> current objects that actually are in memory. Or possibly alert a newbie
> (me?) to what is actually happening.  What do ya'll think?

I'm not sure what you mean by "tracks allocations instead of
lifetime".  In general, though, distributed garbage collecting is a
wildly unsolved problem; the server can't tell whether some remote
client is still holding a reference to an object or not, and the
client can't tell whether an object that it no longer has a reference
to had its reference count correctly decremented when the last
reference was dropped.  Well, except, there is one way -- make sure
that whenever you see a new reference, you increment the count, and
whenever you forget about a reference, you decrement the count.  This
is what _var's do :-)

Some of these issues may change around a lot as we redo the scene
graph stuff, and make it less CORBA-exposed; we should think about how
the new architecture could make memory management simpler...

-- Nathaniel

-- 
"...these, like all words, have single, decontextualized meanings: everyone
knows what each of these words means, everyone knows what constitutes an
instance of each of their referents.  Language is fixed.  Meaning is
certain.  Santa Claus comes down the chimney at midnight on December 24."
  -- The Language War, Robin Lakoff

This email may be read aloud.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.