<div dir="ltr">Hi Chris,<div><br></div><div>    in Spur, primitiveGarbageCollect answers the largest free chunk in oldSpace, not the total free space.  This is done so that handleFailingBasicNew: et al can determine whether memory should be grown before an allocation is retried:</div><div><br></div><div><div>handleFailingBasicNew: sizeRequested</div><div><span class="" style="white-space:pre">        </span>&quot;handleFailingBasicNew: gets sent after basicNew: has failed and allowed</div><div><span class="" style="white-space:pre">        </span> a scavenging garbage collection to occur.  The scavenging collection</div><div><span class="" style="white-space:pre">        </span> will have happened as the VM is activating the (failing) basicNew:.  If</div><div><span class="" style="white-space:pre">        </span> handleFailingBasicNew: fails then the scavenge failed to reclaim sufficient</div><div><span class="" style="white-space:pre">        </span> space and a global garbage collection is required.  Retry after garbage</div><div><span class="" style="white-space:pre">        </span> collecting and growing memory if necessary.</div><div><br></div><div><span class="" style="white-space:pre">        </span> Primitive. Answer an instance of this class with the number of indexable</div><div><span class="" style="white-space:pre">        </span> variables specified by the argument, sizeRequested.  Fail if this class is not</div><div><span class="" style="white-space:pre">        </span> indexable or if the argument is not a positive Integer, or if there is not</div><div><span class="" style="white-space:pre">        </span> enough memory available. Essential. See Object documentation whatIsAPrimitive.&quot;</div><div><br></div><div><span class="" style="white-space:pre">        </span>&lt;primitive: 71&gt;</div><div><span class="" style="white-space:pre">        </span>| bytesRequested |</div><div><span class="" style="white-space:pre">        </span>bytesRequested := self byteSizeOfInstanceOfSize: sizeRequested.</div><div><span class="" style="white-space:pre">        </span>Smalltalk garbageCollect &lt; bytesRequested ifTrue:</div><div><span class="" style="white-space:pre">                </span>[Smalltalk growMemoryByAtLeast: bytesRequested].</div><div><span class="" style="white-space:pre">        </span>&quot;retry after global garbage collect and possible grow&quot;</div><div><span class="" style="white-space:pre">        </span>^self handleFailingFailingBasicNew: sizeRequested</div></div><div><br></div><div>Further, primBytesLeft answers the amount of free old space, excluding newSpace entirely.  newSpace is continually changing its capacity as allocation and scavenging continues, so IMO including that information introduces noise.</div><div><br></div><div>But you point out that both methods should be commented accurately in Spur.  I&#39;ll make it so.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 23, 2015 at 8:23 AM, Chris Muller <span dir="ltr">&lt;<a href="mailto:ma.chris.m@gmail.com" target="_blank">ma.chris.m@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Has anyone else noticed that flushing Monticello cached versions in<br>
Spur no longer reports any memory freed up..?<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">best,<div>Eliot</div></div>
</div>