GC doesn't reduce image size in memory until restart

Tim Rowledge tim at sumeru.stanford.edu
Sat Nov 23 00:32:26 UTC 2002


On Friday, November 22, 2002, at 04:05  PM, Derek Brans wrote:

> Garbage Collection doesn't reduce image size in memory until restart.  
> At least that's my observation:  I close and reopen my image and it's 
> 40 Megs smaller.
> Anyone know why this happens?
Depends on what exact machine you're running on. GC _basically_ cleans 
up memory and compacts all your objects so as to make the maximum free 
chunk. Actually _releasing_ memory back to the OS is something that is 
machine dependent - look for implementations of sqGrowMemoryBy and 
sqShrinkMemoryBy. For example, win32 implements them. Assuming they do 
what is advertised you should find the memory used by your running 
image can go up and down.

Personally I'm not entirely sure it has much virtue - some past 
experience shewed me that the first thing likely to happen when you 
release a chunk of memory is that you ask for another chunk....


tim
--
tim at sumeru.stanford.edu




More information about the Squeak-dev mailing list