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

Re: GC safety and return values

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.

    > From: Jim Blandy <jimb@xxxxxxxxxx>

    >   Another issue is that, if a collection could occur at any time, the
    >   values returned by macros like SCHEME_EXTRACT_VALUE_POINTER and
    >   EXTRACT_STRING can't be trusted long enough to be useful.  This can
    >   be solved in various ways; one idea is sketched in:

    >     http://sources.redhat.com/ml/guile/1999-01/msg00093.html

That (having a distinct free function and leaving sharing unspecified)
is a better idea than SCHEME_ALLOCATE_COPY_OF_* (and
SCHEME_EXTRACT_*).   It can be very efficient on systems where sharing
is easy.