VM and memory on win32

Andreas Raab andreas.raab at gmx.de
Thu Sep 14 22:36:47 UTC 2006


Ramon Leon wrote:
> Hi, I was playing around with some rather large data sets and seemed to have
> run into an issue with the 3.7.1 VM, which as far as I know is the latest
> and greatest for windows.  It seems that the VM allocates memory
> dynamically, ignores the memory: command line switch, and memory seems
> capped somewhere around 900 meg.  Once I get up to about 900 or so, I get...
> 
> Space is low
> Warning! Squeak is almost out of memory!

Not surprising. Memory is capped at 1GB.

> My issues aside, I was wondering why Squeak can't use all available memory
> when necessary, I have 2gigs, why should the VM be limited to 900 or so
> megs?  I was on #squeak IRC channel discussing this and someone mentioned
> the crashing could be a bug related to int's vs. unsigned int's somewhere in
> the VM.  So if anyone has any answers to either issue, the memory limit, or
> the fatal crashing, I'd love to hear about it.

The answer to memory limit is simple: We can't use more than a gig just 
because Windows won't let us. If you review the memory layout used by 
Windows you'll find that only 2GB are available as user space to begin 
with. Inside that address space we need to map both the executable, 
various portions of memory allocated by the VM directly (buffers etc), 
some Windows resources plus the actual Squeak object memory. And since 
Squeak requires contiguous portions of memory the chances of being able 
to allocate more than 1GB are very slim.

Cheers,
   - Andreas





More information about the Squeak-dev mailing list