On Tue, Oct 27, 2009 at 01:20:56PM -0400, John Cowan wrote:
> Jeronimo Pellegrini scripsit:
> 
> > define-external cannot be used for recursive definitions (probably
> > supposed to be used only for wrappers -- is this correct?)
> > My recursive define-external functions segfaulted; non-recursive
> > ones didn't.
> 
> The real issue isn't recursion, it's stack consumption.  C recursion
> consumes stack, and when Chicken calls C only a small amount of stack
> is guaranteed to be available, because of the way Scheme code uses the C
> stack (steadily consuming it and then dropping almost all of it at each
> minor GC).

Ah, OK -- now I understand it! So it actually makes sense to only
use define-external for API wrappers, so as to avoid using too much
stack space.

Thanks a lot!
I just started using Chicken and it seems like a great platform.

J.



_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to