[Newbie] Memory question

Andrew C. Greenberg werdna at mucow.com
Wed Nov 7 02:25:35 UTC 2001


On Tuesday, November 6, 2001, at 08:20  PM, Jesica Andrea Wulfson wrote:

> Hello everybody, I'm running Squeak V3.1Beta and I'd like to know if 
> there's a method i can use to assign an amount of memory for the VM.
> Does it work the same on Mac and Windows? If it doesn't, I'd like to 
> see both methods because I work on Windows and my teacher works on Mac, 
> and we both want to know the same.

If by this, you means reserving memory for the VM, reserving memory for 
plugins and the like, this is straightforward.  On Windoze and Unix 
machines, the memory is more or less allocated through ordinary means, 
malloc, et al.

On the Macintosh prior to MacOSX, all memory, less a slop of (as I 
recall) 500K is used for the object image, with memory allocable from 
the slop.  To increase the size of the slop, set a VM parameter from the 
image, save the image and restart the machine.  For example, if you want 
to increase the Macintosh slop from 0.5M to about a megabyte, do the 
following:

	1.	Start up an image.
	2.	Open a workspace and execute the following:
			Smalltalk extraVMMemory; 500000
	3.	Save the image
	4.	Restart

You can check the recorded slop by printing out the following:

			Smalltalk extraVMMemory

Now be careful!  Memory reserved to the VM is removed from the Object 
memory.  It is possible that upon saving the image, the application may 
not start up properly unless the memory allocated to the Squeak VM is 
increased.

I do not know if this will be necessary for post-MacOSX VMs.





More information about the Squeak-dev mailing list