[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: howell@cats.UCSC.EDU
- Subject: Re: gc
- From: firstname.lastname@example.org (Bill St. Clair)
- Date: Wed, 7 Oct 1992 16:43:52 -0500
- Cc: info-mcl
>A colleague of mine here and I are working with MCL 2.0 for
>doing real-time MIDI operations. We use a very fast clock
>which spins very fast waiting for incoming and outgoing MIDI
>events. This allow for incredible accuracy for example with
>jazz accompaniments which match the tempo and notes of a
>played melodic line.
>The problem is that this clock creates immense amounts of
>garbage such that in some cases a GC occurs within 10 seconds.
>We are attempting to clean up the clock but our refinements
>are such that it leads us to believe that even a very clean
>clock will not impede the GC by much. Is there a way to have
>an incremental GC (i.e. do a little bit a lot of the time
>rather than waiting and then having it take such a damnable
>amount of time to collect)? We can't just force a GC because
>as you know even if there is nothing to collect it takes over
>a second to function, sometimes even longer.
>Any suggestions would be greatly appreciated.
I'm afraid that your only real alternative is to remove all of
the consing from your clock function. If it doesn't cons, the GC
will never need to run. Even the ephemeral GC is likely to slow you down
too much (it can take 1/10 second even on a fast Mac). This is the
approach taken by all real-time Lisp code I have ever heard about,
including HyperLisp: don't cons.