[racket] disable garbage collection

From: Stephen Bloch (sbloch at adelphi.edu)
Date: Thu Jun 2 15:46:14 EDT 2011

On Jun 2, 2011, at 3:35 PM, Neil Van Dyke wrote:

> Good points.  For my list of reasons, I was thinking only of disabling GC for the lifetime of a process, but there are additional reasons that one might want to temporarily inhibit GC for a shorter duration.

An even simpler thing to do, which won't give you hard-real-time guarantees but will work most of the time, is to allow the programmer to say "Please garbage-collect NOW" just BEFORE a time-critical section of code.  I could have sworn there used to be a (gc) function that did this, but it doesn't seem to work in 5.1.


Stephen Bloch
sbloch at adelphi.edu




Posted on the users mailing list.