[squeak-dev] how/where is memory returned to the OS?
David T. Lewis
lewis at mail.msen.com
Fri Oct 19 17:55:32 UTC 2012
On Fri, Oct 19, 2012 at 10:46:45AM -0500, Chris Muller wrote:
> 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?
Address space gets allocated as needed to meet your >500MB requirement,
and that address space stays mapped to your VM process, hence displayed
by "top". Actual memory pages are freed automagically by the virtual
memory system. The sizes reported by the VM parameters reflect the size
of the object memory, and is a better indication of the actual amount
of memory being actively used.
More information about the Squeak-dev