<br><br><div class="gmail_quote">On Thu, Jul 15, 2010 at 2:42 PM, Rob Withers <span dir="ltr">&lt;<a href="mailto:reefedjib@yahoo.com">reefedjib@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
 <br>



<div style="padding-left: 10px; padding-right: 10px; padding-top: 15px;" name="Compose message area">
<div><font face="Arial" size="2">Utilities pointersTo: object</font></div><font face="Arial" size="2">
<div><br></div></font></div></blockquote><div><br>Thanks Rob. But that implementation does a someObject and then loops with nextObject. Thus, it does a full memory scan. I want to avoid that. So the only way is storing somewhere such pointers or at least a counter I think. <br>
<br>Thanks agian<br><br>mariano<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div style="padding-left: 10px; padding-right: 10px; padding-top: 15px;" name="Compose message area">
<font face="Arial" size="2"><div>----<br><a title="http://www.noharmmeansnofoul.org
CTRL + Click to follow link" href="http://www.noharmmeansnofoul.org" target="_blank">http://www.noharmmeansnofoul.org</a></div>
<div> </div>
<div></div></font> </div>
<div style="font: 10pt Tahoma;">
<div><br></div>
<div style="background: none repeat scroll 0% 0% rgb(245, 245, 245);">
<div><b>From:</b> <a title="mailto:marianopeck@gmail.com
CTRL + Click to follow link" href="mailto:marianopeck@gmail.com" target="_blank">Mariano Martinez Peck</a> </div>
<div><b>Sent:</b> Thursday, July 15, 2010 8:40 AM</div>
<div><b>To:</b> <a title="mailto:vm-dev@lists.squeakfoundation.org
CTRL + Click to follow link" href="mailto:vm-dev@lists.squeakfoundation.org" target="_blank">Squeak Development Discussion 
Virtual Machine</a> </div>
<div><b>Subject:</b> [Vm-dev] Detecting objects that point to an 
object</div></div></div>
<div><br></div>
<p>
</p><hr>

<p></p>Hi folks. I need to know the objects (actually, only how many) that are 
pointing to any object. So...I take an object X, and I want to know how many 
objects are pointing to X. <br><br>The only possible I see in Squeak VM is to do 
a full mark over all objects in memory (or starting by the roots). This is time 
consuming and I even need (maybe) to do this check (to know how many objects are 
pointing to an object) for every single object.<br><br>So...is there a faster 
solution for this? The only thing I can imagine is to modify the object header, 
maybe create a new type, and add an array with the addresses of the objects that 
are pointing to that object. Or maybe just a counter that I can increase or 
decrease ?<br><br>Thanks for any tip. <br><br>Mariano<br>
<br></blockquote></div><br>