Hi,
I am going to implement an internal profiler for memory on linux. I want to save the stack for each malloc/free/realloc. I am trying to use "pstack" to get the stack trace everytime. But the overhead is too high. Is there any lightweigt approach to get the call stack in C code?
I know there are some tools like "valgrind, google profiler", but don't know how they remebmer the stacks for each action.
Any comment is appreciated.
Thanks.