Forum Discussion
Altera_Forum
Honored Contributor
15 years agoThe stack and heap are dynamic so they grow and shrink during run time. For example when you call a function variables get placed on the stack so that when you return from the function they are still present. If you use global variables or use malloc() then the heap is used for that. (I'm over simplifying it so these are just examples) The stack starts at one location and the heap starts at another, and as the usage of each grows they get closer together (if they are located sequentially in memory) and if they get too large you can run into a "collision" and data corruption will result.
So the IDE can't tell you how big they are since it has no clue how your code behaves. This is true of any processor and compiler. To find out more search for "heap" or "stack" in this document: http://www.altera.com/literature/hb/nios2/n2sw_nii5v2.pdf