<br><br><div class="gmail_quote">On Fri, Nov 26, 2010 at 9:15 AM, Andres Valloud <span dir="ltr">&lt;<a href="mailto:avalloud@smalltalk.comcastbiz.net">avalloud@smalltalk.comcastbiz.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I&#39;m not familiar with Squeak&#39;s GC... can you also assume that a GC (e.g.: a &quot;new space&quot; scavenge) won&#39;t move the marker so that the enumeration goes past it?</blockquote><div><br></div><div>IIUC, that&#39;s irrelevant.  FOr the marker technique to work all that&#39;s needed is that the relative order of live objects isn&#39;t changed.  The only thing that can change that is a become:.  In the absence of a become: the end marker, no matter how many GCs occur, stays above/after all previously activated objects and below/before all subsequently allocated objects.  The Squeak GC effectively only compacts to squeeze out reclaimed objects, it does not reorder.  So this is very different to the VM/HPS GC.</div>
<div><br></div><div>HTH</div><div>Eliot</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5"><br>
<br>
On 11/26/10 9:12 , Bert Freudenberg wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On 26.11.2010, at 18:09, Andres Valloud wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Can you assume that allocation is sequential?<br>
</blockquote>
<br>
I can.<br>
<br>
- Bert -<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 11/26/10 8:59 , Bert Freudenberg wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On 26.11.2010, at 17:43, Andres Valloud wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You *must* use an end marker, i.e.,<br>
<br>
        last := Object new. &quot;end marker&quot;<br>
        obj := self someObject.<br>
        [last == obj] whileFalse:[<br>
                count := count + 1.<br>
                obj := obj nextObject.<br>
        ].<br>
<br>
This will work because it counts between the beginning of memory and the<br>
(arbitrary) end marker. Anything else basically should not be relied on<br>
to work, jit or no.<br>
</blockquote>
<br>
What happens if a process with higher priority interrupts the iteration and creates more objects?<br>
</blockquote>
<br>
New objects would come after the end marker in memory.<br>
<br>
- Bert -<br>
</blockquote></blockquote>
<br>
<br>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br>