Re: Restrictions Felix Winkelmann 06 Jan 2004 07:48 UTC

Am Tue, 06 Jan 2004 08:35:29 +0100 hat Michael Sperber
<xxxxxx@informatik.uni-tuebingen.de> geschrieben:

>>>>>> "Felix" == Felix Winkelmann <xxxxxx@proxima-mt.de> writes:
>
> Felix> Michael Sperber wrote:
>
> felix> Note that the Chicken FFI (for example) does not allow GC during
> the
> felix> invocation of foreign code,
>
>>> Sure, and that *greatly* simplifies a lot of issues.  It's also an
>>> unacceptable restriction for many Scheme systems.
>
> Felix> Well, I wonder what that should be. Could you provide an example?
>
> Any environment where
>
> - C code allocates
> - allocation may trigger a GC to provide the requested space

Huh? Then perform a callback. Where's the problem?

(BTW, if you re-read the message you're quoting, it says:

"Note that the Chicken FFI (for example) does not allow GC during the
invocation of foreign code,
  unless callbacks are explicitly used"
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)

>
> These include, at the very least:
>
> - Scheme 48
> - scsh
> - MzScheme
> - Gambit-C
> - Elk

(In case you completely misunderstood: Chicken allows callbacks.
Callbacks may allocate, allocation may GC, i.e. C code called in Chicken
may GC)

>
> PS: Please note this is SRFI 50; you posted to the SRFI 40 mailing
>     list
>

Yep, sorry. I noticed two seconds too late and reposted it.

cheers,
felix