<br><br><div class="gmail_quote">On Fri, Oct 19, 2012 at 11:31 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">
<div class="im">&gt;&gt; I have an image which needed to allocate 500MB of memory for a large<br>
&gt;&gt; operation.  Now that operation is done and all objects have been<br>
&gt;&gt; reclaimed.  According to VM I am now only using 200MB.<br>
&gt;&gt;<br>
&gt;&gt;   (Smalltalk vmParameterAt: 2) max: (Smalltalk vmParameter at: 1)<br>
&gt;&gt; &quot;221923374&quot;<br>
&gt;&gt;<br>
&gt;&gt; However, when I look at my VM process in &quot;top&quot; or the System Monitor,<br>
&gt;&gt; it still says its &gt;500MB.<br>
&gt;&gt;<br>
&gt;&gt; How does this work?<br>
&gt;<br>
&gt; Depends on the platform.  On Mac OS X memory is not returned. On Windows<br>
&gt; memory is allocated and freed via VirtualAlloc and VirtualFree.  On Unix<br>
&gt; memory is allocated and returned via mmap and munmap by default.  What OS<br>
&gt; are you on?  Looks like the unix code could be ported to the Mac easily.<br>
<br>
</div>Linux chrisT520 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26 21:33:09<br>
UTC 2012 x86_64 x86_64 x86_64 GNU/Linux<br>
<br>
So, after several hours top still shows &gt;500MB.  Will it ever go back<br>
down to the level reported by vm-parameters [1,2 or 3]?<br></blockquote><div><br></div><div>I&#39;m not sure.  It all depends on the useMmap variable in the linux vm.  If it is non-zero then a cursory reading of the source says that yes, the memory should be returned. </div>
</div>-- <br>best,<div>Eliot</div><br>