Squeak memory allocation

Dwight Hughes dwighth at ipa.net
Tue Nov 3 22:41:33 UTC 1998


lex at cc.gatech.edu wrote:
---snip---
> 
> Next, I modified the ObjectMemory to also trigger a GC if more than 3 megs have been allocated since the last GC.  When I executed the above line with the new VM, the Squeak process only went up to 17 megs.
> 
> The patch is below, for anyone who wants to play with it.  It's a bit of a hack as is, but simply adding a "maxAllocationBetweenGCs" instance variable, and finding a better name than "lastFreeSpace" would make it pretty clean.
> 
> Also, maybe the max allocation should be smaller for smaller images; for a 2 meg image, for instance, you might want to do a GC after just 1 meg of allocation.
>
> Lex

It would be nice to adjust the value of this "maxAllocationBetweenGCs"
automatically in proportion to the -memory command line argument, so one
would not normally need to fuss with it (but could if desired -- say
with an argument like this: ... -memory: 64.8 ... which means allocate
64MB total, 8MB maxAllocationBetweenGCs).

-- Dwight





More information about the Squeak-dev mailing list