Bernard Urban wrote:
>Notice that for big matrices (hum, not so big, 200x200 is sufficient),
>we have stack overflow in the clisp version. Not in cmucl which
Could you please try to narrow this down? I'm somewhat fed up with stack overflow bugs myself, yet I remember having allocated even 1MB on stack years ago when I measured the performance of the ancient regex module. Heck, we are not on the Amiga which defaulted to 4KB stacks these days!
You need not even link to foreign libraries to test this out. Have a look at tests/ffi.lisp in the source (or CVS), which defines a function c-self * -> * which you can typecast to anything, or just use with-foreign without calling another function. Perhaps that's enough to trigger the bug?
Generally, I have no idea about the OS stack limits. 40000 double-floats (presumably 8 bytes, total 320.000) doesn't seem that large (I've heard of a 2MB default on Linux, not to mention that I thought stack extension would work on modern UNIX?!?).
But if you need to depart from stack-allocated objects, you'll be close to with-alien/foreign-object code. Consider writing a macro like with-foreign-object that uses allocate-foreign, unwind-protect and foreign-free instead.
Get latest updates about Open Source Projects, Conferences and News.