growing and shrinking ObjectMemory

Bert Freudenberg bert at isg.cs.uni-magdeburg.de
Mon Mar 5 07:58:58 UTC 2001


On Sat, 3 Mar 2001, Jan Bottorff wrote:

> I seem to remember from ParcPlace days some OS's having a REALLY ugly issue 
> about demand committed memory.
> 
> It goes like this, you allocate a bunch of memory/address space that's 
> backed by demand zero filled memory. The call to this allocation works 
> fine, and your software "thinks" it has the memory. Time passes, and other 
> applications use up some swap space. Eventually, your app decided to 
> actually touch one of those pages it allocated way back when, and uh oh, 
> the swap file is full. So how do you not inform the app that memory it 
> allocated, is actually unavailable? If the original allocated had failed, 
> the program logic could probably cope. Is the VM prepared to get a swap 
> file full memory access fault anytime it might be writing to memory for the 
> first time?

It's not. 

A funny (not so) thing to note is that I can run four times "squeak
-memory 128M" but not once "squeak -memory 256M". There's "not enough
memory" for the latter, while the first succeeds. I haven't actually
tested what happens if I trash the memory in the first example, but I'd
expect ugly things X-/

-- Bert





More information about the Squeak-dev mailing list