I am working on a embedded system. We have limited stack and heap in our embedded system typically 64k (ram). I am trying to use polar-ssl library calls. Is there any tools which tells how much stack and heap memory is used by a C function?
Is there any option is in valgrind which prints the following:
If you give the -v option, Valgrind will print the list of used suppressions at the end of execution. For a leak suppression, this output gives the number of different loss records that match the suppression, and the number of bytes and blocks suppressed by the suppression.
My other usual go-to for debugging memory issues, valgrind, also doesn't work very well for stack issues - it's much better at tracking heap allocations and writes than stack problems.
Valgrind includes an option to check for memory leaks. With no option given, it will list a heap summary where it will say if there is any memory that has been allocated but not freed. If you use the option --leak-check=full it will give more information.
There is a valgrind tool massif that measures how much heap memory an application uses. Similarly memcheck can give you stack trace. More explanation here
http://wiki.eclipse.org/Linux_Tools_Project/Valgrind/User_Guide#Analyzing_Memcheck_Profile_Results
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With