There are certain conditions that can cause stack overflows on an x86 Linux system:
struct my_big_object[HUGE_NUMBER]
on the stack. Walking throu
The deprecated alloca() routine (like malloc(), but uses the stack, automatically frees itself, and also blows up with SIGSEGV if it's too big).
Why is alloca deprecated?
Anyhow, how much faster in your case is alloca vs malloc? (Is it worth it?)
And don't you get null back from alloca if there is not enought space left? (the same way as malloc?)
And when your code crash, where does it crash? is it in alloca or is in doStuff()?
/Johan