info required
Hi All,
I am an Validation Engineer, i need info on how to verify how to verify memory leak using Linux commands. Is there any command or tool available in open source, so that i ca use to test memory leak. Thanks Shiva |
You may find this article helpful. It is focused on memory leak detection on embedded systems but it should apply equally well to regular Linux systems.
Håkan |
there is a tool called mtrace
modify source code to #include <mcheck.h> then invoke mtrace(); at the beginning of main. export MALLOC_TRACE=memory.log and run the programm then mtrace my_program $MALLOC_TRACE also you can use the ccmalloc library as a replacement for malloc and free as a way to trace mem allocation also a tool called "Electric Fence" you can link against that will stop at any bad read/write and tell you what happened this is the only way i know of to find illegal reads so it's kind of important. this one will do lots of different stuff by setting SHELL variables so read the manual. |
All times are GMT -5. The time now is 03:06 PM. |