[racket] disable garbage collection

From: Richard Cleis (rcleis at mac.com)
Date: Thu Jun 2 17:58:59 EDT 2011

On Jun 2, 2011, at 1:46 PM, Stephen Bloch wrote:

> 
> 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.

In some of my cases, the process prepares for a small number of operations which it eventually executes on a precise hack. The ordering would be: hack, execute limited critical operations, prepare for the next hack (the bulk of the processing), gc, wait for the next hack (via interrupt, select, whatever).  If I were a real researcher with a real budget, investigating the limitations of that sort of thing would be high on my list. I have many ideas for control systems that will never be attempted, because hard-hacking in C is tedious and de-motivational. Fine software tools are available but they discourage, if not prevent outright, thinking out of the box.

rac

> 
> 
> Stephen Bloch
> sbloch at adelphi.edu
> 
> 
> _________________________________________________
> For list-related administrative tasks:
> http://lists.racket-lang.org/listinfo/users



Posted on the users mailing list.