[plt-scheme] Garbage collection

From: Andre van Tonder (andre at het.brown.edu)
Date: Wed Aug 27 12:09:42 EDT 2003

Is there a way of forcing MzScheme to automatically collect garbage before
the memory image gets too big?  

I have a program that runs out of core memory and starts thrashing the
page file.  However, if I insert explicit (collect-garbage) statements in
the code, it turns out that the size of the active memory is quite
small and stays constant.  I would like the GC to trigger automatically
so I don't need to clutter my code with CG-statements.

By the way, the code uses call/cc a lot, which does seem to be very
expensive in MzScheme as opposed to, say, Chez.  Is there an inherent
reason why this is the case?


Posted on the users mailing list.