Forum Discussion
Altera_Forum
Honored Contributor
19 years agoHi Slacker,
I didn't make myself clear, I meant i tried using the Debugger with the Run time stack checking" option on. But I was not sure where to look at for stack and heap memory in the Debug interface in NIOS II IDE. Where should I look into in the debug interface to look at the current stack memory and heap memory while I am debugging. Thanks Tony --- Quote Start --- originally posted by slacker+jul 18 2006, 06:12 pm--><div class='quotetop'>quote (slacker @ jul 18 2006, 06:12 pm)</div>--- quote start ---
<!--quotebegin-ikuo005@Jul 17 2006, 07:54 PM thanks for your reply, slacker http://forum.niosforum.com/work2/style_emoticons/<#emo_dir#>/smile.gif
as i don't have very clear concept as to what kind of stuff are stored in heap &stack memory. i didn't know where to look for to get an idea how much i might need to allocate for them. is it the registers that i should be looking at?? --- Quote End --- This is something that must be determined at run time. You cannot determine it statically... <div class='quotetop'>QUOTE </div> --- Quote Start --- When i was compiling my c files, the following info was printed to the console in NIOS II IDE, does this suggest the size that are estimated to be needed for heap and stack at the compilation time? Info: (four_regs_write.elf) 175 KBytes program size (code + initialized data). Info: 16208 KBytes free for stack + heap.[/b] --- Quote End --- This is telling you how much free space you have for the stack and the heap, combined. The heap starts from the bottom and increments and the stack starts from the top and decrements. Eventually, depending on how your code runs, they can collide. You can reduce your code's memory footprint in several ways. These methods are mentioned, inline, in several of the software example templates (hello world small comes to mind, though I think hello led has something as well) Cheers, - slacker <div align='right'><{post_snapback}> (index.php?act=findpost&pid=16974)</div> [/b] --- Quote End ---