Link to home
Start Free TrialLog in
Avatar of ambuli
ambuliFlag for United States of America

asked on

How to use mtrace to detect memory leaks

Hi,

I want to see if my application has any memoryleak.  Is there any tools that I can use? I found references to mtrace on web.  But, It seems it is not installed on my Linux system...??

-bash: mtrace: command not found

Thanks,
Avatar of jkr
jkr
Flag of Germany image

The most widely used tool is IMO 'dmalloc' (download plus docs: http://dmalloc.com/), see http://www.linuxjournal.com/article/6556 ("Memory Leak Detection in C++") for alternatives and general info on this issue.
Avatar of ambuli

ASKER

Hi JKR.  My System is Centos.  I am not sure if I can downloadthe rpm for redhat and install it.  By the way, mtrace seems to be included in glibc...  So, where is it installed on a system?

Thanks
Smalloc comes as source and in not just installed on your system. No need to download an RPM, the code is available via http://download.sourceforge.net/dmalloc/dmalloc-5.4.2.tgz - you need to compile that and link your application with it.
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial