Solved

How to use mtrace to detect memory leaks

Posted on 2006-11-16
4
709 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
ID: 17962292
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
ID: 17962346
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
ID: 17962386
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
ID: 17962404
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

776 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