Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to use mtrace to detect memory leaks

Posted on 2006-11-16
4
Medium Priority
?
740 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 1000 total points
ID: 17962404
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

971 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