My memory gobbling loop causes the gc to perform badly. Why?
The loop you are running is likely not releasing any bytes of heap for the amount it is allocating. A loop similar to (compile (defun gobble () (loop for x from 1 to 1000000000000000000000000 with k = 0 do (incf k) (when (= k 10000000) (print “.”) (setq k 0)) collect x))) (gobble) is likely generating almost no garbage. Allegro CL’s garbage collector makes decisions about how much space to allocate based on the gsgc-parameters that are currently set, and the effect of this loop is to throw the calculations into a non-linear area where the only thing it can do is to cause the heap to grow at a huge rate of increase. Most real programs never run this way; either they don’t cons at all, or at least some of the consing done is ephemeral, even if only a few percent of the total consing. And, of course, any program which continues to cons permanent space should be considered leaky, unless it is explicitly a test to gobble up all of memory, and to see how such gobbling progresses. To get bett