[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Another gc question
Date: Sat, 5 Aug 89 12:34:39 edt
From: email@example.com (Seth Goldstein)
I would like to change my cursor just before garbage collection.
How may I do this without spending all my time polling the system
and without missing garbage collections or causing them prematurely?
If you are using Allegro CL with gsgc (version 2.1 or later), there
are two C externals defined in the gsgc:
These are initially 0, but if the garbage collector discovers that
gc_before is non-zero at entry to a gc, then the call is done before
proceeding with the collection. Likewise, if gc_after is non-zero
at the end of the collection, the routine is called.
Be very careful when using these functions to only call C (or other
foreign) routines. Using foreign function call back into lisp (or
otherwise touching the lisp heap) during this very vulnerable period
when the heap is expecting to be scavenged or gc'd will almost
certainly result in badly corrupting your lisp session.
Bob Rorschach and Charley Cox