[squeak-dev] how/where is memory returned to the OS?

Chris Muller ma.chris.m at gmail.com
Fri Oct 19 18:31:35 UTC 2012

>> I have an image which needed to allocate 500MB of memory for a large
>> operation.  Now that operation is done and all objects have been
>> reclaimed.  According to VM I am now only using 200MB.
>>   (Smalltalk vmParameterAt: 2) max: (Smalltalk vmParameter at: 1)
>> "221923374"
>> However, when I look at my VM process in "top" or the System Monitor,
>> it still says its >500MB.
>> How does this work?
> Depends on the platform.  On Mac OS X memory is not returned. On Windows
> memory is allocated and freed via VirtualAlloc and VirtualFree.  On Unix
> memory is allocated and returned via mmap and munmap by default.  What OS
> are you on?  Looks like the unix code could be ported to the Mac easily.

Linux chrisT520 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26 21:33:09
UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

So, after several hours top still shows >500MB.  Will it ever go back
down to the level reported by vm-parameters [1,2 or 3]?

More information about the Squeak-dev mailing list