[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] FFI and stack use
From: |
Thomas Bushnell BSG |
Subject: |
[Chicken-users] FFI and stack use |
Date: |
Tue, 21 Jul 2009 16:43:36 -0700 |
I have an FFI function, and it will be allocating some significant stack
space. (It calls the Linux syscall epoll_wait, with a significant
stack-allocated array, and then wants to cons the results into a list.)
So this raises a question. Scheme functions get compiled into code that
carefully checks stack bounds before allocating, and bangs off to the
garbage collector if necessary.
The FFI doesn't do this. So I'm assuming that in fact, I have the full
C stack available, and can just go ahead and use it. When I invoke the
return continuation, it will go just fine, and presumably if I've
exceeded the Chicken stack size, it will just trigger a gc and proceed
happily as before.
Am I right?
Thomas
- [Chicken-users] FFI and stack use,
Thomas Bushnell BSG <=