Solved

How to use mtrace to detect memory leaks

Posted on 2006-11-16
4
700 Views
Last Modified: 2012-06-21
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,
0
Comment
Question by:ambuli
  • 3
4 Comments
 
LVL 86

Expert Comment

by:jkr
Comment Utility
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.
0
 

Author Comment

by:ambuli
Comment Utility
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
0
 
LVL 86

Expert Comment

by:jkr
Comment Utility
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.
0
 
LVL 86

Accepted Solution

by:
jkr earned 250 total points
Comment Utility
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now