<br><br><div class="gmail_quote">On Fri, Oct 19, 2012 at 11:31 AM, Chris Muller <span dir="ltr"><<a href="mailto:ma.chris.m@gmail.com" target="_blank">ma.chris.m@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">>> I have an image which needed to allocate 500MB of memory for a large<br>
>> operation. Now that operation is done and all objects have been<br>
>> reclaimed. According to VM I am now only using 200MB.<br>
>><br>
>> (Smalltalk vmParameterAt: 2) max: (Smalltalk vmParameter at: 1)<br>
>> "221923374"<br>
>><br>
>> However, when I look at my VM process in "top" or the System Monitor,<br>
>> it still says its >500MB.<br>
>><br>
>> How does this work?<br>
><br>
> Depends on the platform. On Mac OS X memory is not returned. On Windows<br>
> memory is allocated and freed via VirtualAlloc and VirtualFree. On Unix<br>
> memory is allocated and returned via mmap and munmap by default. What OS<br>
> 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 >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'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>