[Top][All Lists]

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

Re: [Chicken-users] Chicken C interface

From: Felix
Subject: Re: [Chicken-users] Chicken C interface
Date: Thu, 06 Jun 2013 20:02:06 +0200 (CEST)

From: Dan Leslie <address@hidden>
Subject: Re: [Chicken-users] Chicken C interface
Date: Thu, 06 Jun 2013 09:54:41 -0700

> On 6/6/2013 2:59 AM, Thomas Chust wrote:
>> Therefore foreign-primitive can do allocation in the nursery, but
>> foreign-lambda can't. However, foreign-lambda could still allocate
>> directly in the second generation heap or transfer nursery-allocated
>> values directly into the heap upon return before the stack context is
>> destroyed. The question is whether such magic is present for
>> foreign-safe-lambda, as the documentation may indicate, or whether
>> that
>> is not the case, as Felix has indicated with his earlier message :-)
> I think such magic may exist, or I'm extraordinarily lucky. Objects I
> was constructing inside of a foreign-safe-lambda call were sitting at
> top-level in application instances that were running for quite an
> extended time, and themselves were frequently referenced. (IE, a
> foreign-safe-lambda constructed Color would be referenced as the
> clear-color repeatedly).

It just depends on whether a minor GC happens quickly enough. Once
copied, the values are safe.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]