[gclist] When to collect.
Thu, 20 Nov 1997 10:08:43 -0800
On Nov 20, 10:28am, Hans-Martin Mosner wrote:
> The VisualWorks Smalltalk implementation has user-settable parameters
> that decide when to expand versus collect, based on the total allocated
> space. When the parameter is set to keep memory within physical memory
> bounds allowable for the process, it behaves very nicely.
> What the system does not automatically is to find out which memory size
> is optimal. Our experience has been that for a given application on
> given hardware, it is quite reasonable to set a fixed value.
I agree with the last statement only if:
1) Your machine has enough physical memory to run the application in physical
memory. Usually but not always true these days. And
2) This is the only application of interest on the machine while it's running.
Unless and until you provide the GC as an OS service, I expect this to become
less and less true. There are currently 90 processes running on my
workstation. I use a number of them (Netscape, mail, a few shell sessions)
often enough that I get annoyed if they are gratuitously paged out.
Another alternative to (2) is the case in which I can predict memory
requirements for the application fairly accurately, independent of input.
I don't find that to be true very often. (E.g. even netscape and mail vary a
lot. Something like the SGI compiler varies tremendously depending on the
input program and optimization options.)