Cool! Is there any kind of in depth discussion of the garbage collector, things like ___STILL, etc.? I remember a few mentions in the official docs, but not enough to wrap my head around.
-Jason
On Tue, Mar 26, 2013 at 7:43 AM, Marc Feeley feeley@iro.umontreal.cawrote:
On 2013-03-26, at 10:17 AM, Jason Felice jason.m.felice@gmail.com wrote:
I don't have the environment to use the ___BEGIN_ALLOC_VECTOR() macros.
(No ___hp).
I know the size ahead of time. If possible, I'd like to avoid passing
___hp all the way down.
Actually, this is one place where I'd love documentation - the
environment for writing C functions and how things are protected from gc, etc. I can put it together after I figure it out.
Use this instead:
long length = 100; ___SCMOBJ init = ___FAL; ___SCMOBJ v = ___EXT(___make_vector)(length, init, ___STILL);
An alternative is to create the vector in Scheme, and pass it to C to be filled in using mutation. Marc