Linux memory issues resolved?

Lex Spoon lex at cc.gatech.edu
Mon Jan 4 23:07:26 UTC 1999


Brian <briank at hex.net> wrote:
> After searching the Squeak archives and related websites, I have found
> no definitive answer as to the "out of memory" problem some folks
> (including me) seem to be experiencing.  My system is running the 2.0.35
> kernel, XFree86 3.3.2, 64M of RAM.  I can't  seem to get through the
> first few examples of Chris Phoenix's tutorial before the VM warns I'm
> almost out of memory, then just crashes.
> 
> The VM appears to take up anywhere between 12M and 18M on startup, which
> still leaves about 18M available on my system.  Is anybody actually
> running Squeak on a similar configuration?
> 

Try adding the -memory option to your command line.  Squeak's memory allocation works by allocating a large heap when it starts up, and then allocating all of its objects inside of that heap.  The default is to allocate a 5 megabyte heap, which is small for more recent VMs.  Increase it to 10 or 20 for a 64Meg machine and you should be fine:

	Squeak -memory 10m work.image


Note, I was corrected a month or so ago: if you allocate more memory than you actually use, then it will simply take up swap space.  It won't take real RAM away from other programs.  I've been running Squeak with a 50 MB allocation, yet the Squeak proces only takes about 11-12 MB of real RAM.


> On a related note, I couldn't get the pre-compiled VM exec to run, so
> I compiled my own (after figuring out how to get around 'make mkdir'
> deleting the very makefile it was trying to read).  With all four files
> in the same directory (VM, image, changes, source), I get an error
> message telling me the change file can't be found.  Is there some
> environment or compile-time variable I need to be setting before firing
> up the VM?

Are your changes and image file are writable (mode 644 perhaps)?  I make that mistake all the time.


Good luck!


Lex


PS -- I've started a section on Unix gotchas and Linux gotchas on the swikis; I simply appended it to the DownloadForUnix page.





More information about the Squeak-dev mailing list