[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I don't believe in "(may GC)"

This page is part of the web mail archives of SRFI 50 from before July 7th, 2015. The new archives for SRFI 50 contain all messages, not just those from before July 7th, 2015.

The draft FFI says:

    double SCHEME_EXTRACT_DOUBLE(scheme_value)
    char * SCHEME_EXTRACT_STRING(scheme_value)

Neither says "(may GC)".

I don't like that.

If I'm using some exotic number representation (constructive reals,
perhaps), then EXTRACT_DOUBLE may very well involve some pretty hairy,
hence possibly GC-causing, computation.

If I'm using some exotic string representations (I'm working on a
functional-splay-tree string type for Pika) -- same deal:
extract-string may take some (possibly GC-causing) work.

Even something innocent like:

     int SCHEME_CHAR_P(scheme_value)

can cause GC if my implementation let's me attach to a hook in its

In short, even if you are going to be stubborn about concurrent
threads or async execution an insist that GC can only happen "at
certain times" -- I'm not convinced that there is a single entry point
anywhere in the FFI which does not qualify for "(may GC)".