[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Is there a macro (with-no-gc...) Should there be?
- To: email@example.com (monsieur HAINEUX)
- Subject: Is there a macro (with-no-gc...) Should there be?
- From: firstname.lastname@example.org (Steve Strassmann)
- Date: Mon, 29 Nov 1993 19:26:33 -0500
- Cc: info-mcl
>From: email@example.com (monsieur HAINEUX)
>Subject: Is there a macro (with-no-gc...) Should there be?
>Sender: firstname.lastname@example.org (Usenet News Account)
>Organization: Castle Wetware
>Date: Sat, 27 Nov 1993 19:26:40 GMT
>The idea seems appealing to me, a Lisp-like "take a deep breath and..."
>happy shopping season
There's no (with-no-gc ...) form, because you can trigger a GC
by asking for new storage, also called "consing". Functions like
CONS, LIST, APPEND, MAKE-ARRAY, and MAKE-INSTANCE, and any
function which calls one of these, will "cons", or request new
storage. The real trick is learning all the different ways
MCL might try to allocate new storage.
The garbage collector will not be invoked if you do not request
new storage. So, instead of writing a with-no-gc form, just write
an ordinary expression. Avoid allocating new storage in the critical
section of code by preallocating everything your algorithm needs
before entering it.