Altera_Forum
Honored Contributor
13 years agoProfiling total memory usage in Nios II
Hi, everybody!
A C program is running on a Nios II processor. At the rate of 100 ns, for instance, I need to catch the total memory the program is using, including there the text memory, the data memory, the bss, the heap and the stack. I'm talking about embedded systems, if you understand what I mean about total memory usage in this case. Do I need to have any Operating System running on this processor to get this kind of information? Is there any memory-related service I can call to obtain this information? Using a procedure like this, my intention is to get the largest amount of memory used by each function of the program, so I can find the critical functions in terms of memory usage. Yes, it sounds like profiling with GProf in GCC. I want to implement, now, a basic resource to profile total memory usage with GCC and, further, get the usage of each kind of memory (text, data, bss, heap, stack). Any help will be welcome.