Forum Discussion
Altera_Forum
Honored Contributor
10 years agoMost likely the stack will crash into the heap and all hell will break loose.
Maximum stack use is likely to be in some obscure error path. Maximumum heap use is likely to happen due to heap fragmentation. In reality, unless you have a lot of spare memory (so it just isn't going to be a problem), you don't want to be using heap allocated memory (certainly not after any initialisation phase). My nios code (which implements a hdlc and a protocol over it) is carfully written so that the compiler can inline all function calls and never uses the stack at all (ok, there is still some function prologue that saves registers on the stack).