Function
system
mark-and-sweep gen-number => bytes
0 for the most recent generation, 1 for the most recent two generations, and so on up to a maximum (usually 3). Numbers outside this range signal an error.
The number of bytes allocated in that generation.
mark-and-sweep is used to garbage-collect a specified generation of storage (and all lower generations). A call to this function forces the garbage collector to scan the specified generations. This can be of use in obtaining consistent timings of programs that require memory allocation. Alternatively, performance can sometimes be improved by forcing a garbage collection, when it is known that little memory has been allocated since a previous collection, rather than waiting for a later, more extensive collection. For example, the function could be called outside a loop that allocates a small amount of memory. mark-and-sweep takes, but also the more space recovered. (mark-and-sweep 0) ; collect most recent generation (mark-and-sweep 3) ; collect all generations
avoid-gcget-gc-parametersgc-if-needednormal-gcset-gc-parameterswithout-interruptswith-heavy-allocation