[Vm-dev] Re: [squeak-dev] how/where is memory returned to the OS?
eliot.miranda at gmail.com
Fri Oct 19 18:11:58 UTC 2012
On Fri, Oct 19, 2012 at 8:46 AM, Chris Muller <asqueaker at gmail.com> 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)
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev