I have a project written in C language. I want to find stack memory(in the form of local variables etc) consumed by the process(realtime if possible or atleast max value).
With massif, I am able to find exact heap consumption. But i am unable to find exact stack usage. I tried enabling using --stacks=yes (compiled with -g flag). But when I print using ms_print, the stack column is showing random values.
Eg:
void main() { int a =10; }
stack value I need should be less than 10.(Considering function return addresses)