So how would you handle pointer to an object which is reference counted? Pointer to the same object may be being used at multiple places.

I am facing some trouble with this. Should I post the code on the review board?

Nilay

On Thu, 20 Jan 2011, nathan binkert wrote:

What's the need of having reference counting? And more specifically, why do
we need message going into ruby to be reference counted?

Reference counting is a garbage collection strategy.  It also happens
to be one that is easily used in C++.  The specific reason why we use
reference counting in a few places is because it can some times be
difficult to keep track of an object and know when to delete it.  For
example, if you fire off a message into the memory system, who is
responsible for deleting it?  There are many different paths that a
message could take and potentially many different endpoints where a
message could be finished.  With reference counting, when the last
reference is given up, the object is automatically destroyed.  For
more info, I suggest wikipedia or google.

 Nate
_______________________________________________
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev

_______________________________________________
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to