Classic mac VM 3.2.5

John M McIntosh johnmci at smalltalkconsulting.com
Fri Mar 1 21:46:48 UTC 2002


I been fiddling a bit with the mac classic VM and how memory is 
allocated. I need a few folks that have OS-9.1 or higher to kick the 
tires. This isn't a change for OS-X users.

Some of you might know that memory can be mapped under OS 9.

Therefore I've change the classic memory allocation logic to use 
mapped file logic if available. This allows Squeak if running under 
OS 9.1 to have a 128MB partition and allows you to set the Squeak 
application size to say 2MB since that is where the VM allocations 
working storage, not the image.


The rules are:

a) Ignore all this if you run under os-x, just use the application 
size, But why would you run a classic mac VM under os-x anyways?


1) If the partition size of the application is over 128MB then use 
the partition size. Yes some images are bigger than 128MB.

2) if the VM mapping logic exists allocate a mapped file 128MB in 
size, if we can't get a file that big because of swap space issues 
then fall back in 8MB decrements until we can, or we go below the 
required size needed by the VM loader logic. In that case just 
allocation memory based on the partition size.

3) if the VM mapping logic does not existing because the OS is older, 
then  use the  partition size.


In theory for os-9 users this should give seamless VM growth to the 
128MB boundary.

Mmm I could make this bigger but the mapping logic pregrabs disk 
space and allocating say 512MB for each squeak image lead to disk 
space issues for some folks.

-- 
--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================



More information about the Squeak-dev mailing list