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

Re: Couple things...

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.



On 24 Dec 2003 11:25:04 -0500, Jim Blandy <jimb@xxxxxxxxxx> wrote:


So, to invoke a C function that might perform callbacks, you must
collect and pop your nursery, to allow you to place that call's frame
at the (now exposed) younger end of the C frame area.  In contrast, to
call a C function that you know will not perform callbacks, none of
that is necessary; you just make the call on top of whatever nursery
you've got.

Right.


It seems to me that the called function also must not allocate any
heap objects.  Or do you simply allocate them directly in the next
older generation, bypassing the nursery altogether?


Yes, that's a possibility. The space needed for result values is currently
pre-allocated and passed to the code that wraps the called function.
Callbacks into Scheme can of course allocate as much as they like, since
on return from the callback, live data is moved into the next generation
again.


cheers,
felix