473,387 Members | 1,553 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Memory leak detection tools?

Hi. Any recommendations for memory leak detection tools for C++ running
on Linux or Solaris? I'm interested in static (compile time) and
runtime detection. It's for a large project.

Thanks!

Ken

Nov 2 '06 #1
8 8171
kk****@yahoo.com wrote:
Hi. Any recommendations for memory leak detection tools for C++ running
on Linux or Solaris? I'm interested in static (compile time) and
runtime detection. It's for a large project.

Thanks!

Ken
Try the newsgroup

comp.os.linux.development.system

Nov 2 '06 #2
kk****@yahoo.com wrote:
Hi. Any recommendations for memory leak detection tools for C++ running
on Linux or Solaris? I'm interested in static (compile time) and
runtime detection.
For runtime detection, without the need to recompile,
you might try valgrind, if it is supported on your platform.
It's for a large project.
That might be difficult -- programs run under valgrind
during debugging tend to consume memory and CPU power
in the order of ten times the original program.
But worth a try.

HTH,
- J.
Nov 2 '06 #3
kk****@yahoo.com wrote:
Hi. Any recommendations for memory leak detection tools for C++ running
on Linux or Solaris? I'm interested in static (compile time) and
runtime detection. It's for a large project.
Try comp.unix.programmer. Sun's dbx does the runtime part.

Use of your own operator new can also provide run time data.

--
Ian Collins.
Nov 2 '06 #4
VJ
Jacek Dziedzic wrote:
kk****@yahoo.com wrote:
>Hi. Any recommendations for memory leak detection tools for C++ running
on Linux or Solaris? I'm interested in static (compile time) and
runtime detection.


For runtime detection, without the need to recompile,
you might try valgrind, if it is supported on your platform.
valgrind is supported on linux
>
>It's for a large project.


That might be difficult -- programs run under valgrind
during debugging tend to consume memory and CPU power
in the order of ten times the original program.
But worth a try.
If he makes small unit tests, he can use valgrind on those, and at the
same time test both unit tests and his code

I agree it is much slower then normal compilation
Nov 3 '06 #5
VJ wrote:
>
If he makes small unit tests, he can use valgrind on those, and at the
same time test both unit tests and his code
If he has the good sense to produce decent unit tests, adding operator
new() and delete() to the test harness will serve him well. No need for
anything else.

--
Ian Collins.
Nov 3 '06 #6
VJ wrote:
Jacek Dziedzic wrote:
>kk****@yahoo.com wrote:
>>Hi. Any recommendations for memory leak detection tools for C++ running
on Linux or Solaris? I'm interested in static (compile time) and
runtime detection.

For runtime detection, without the need to recompile,
you might try valgrind, if it is supported on your platform.


valgrind is supported on linux
Yes, but not for all architectures, like IA-64, for instance.

- J.
Nov 3 '06 #7
VJ
Ian Collins wrote:
VJ wrote:
>>If he makes small unit tests, he can use valgrind on those, and at the
same time test both unit tests and his code

If he has the good sense to produce decent unit tests, adding operator
new() and delete() to the test harness will serve him well. No need for
anything else.
Shit happens, cause noone is perfect, therefore testing for memory leaks
in unit tests is not bad, just takes time and should not be used often.

Murphies law rules everywhere ;)
Nov 3 '06 #8
VJ wrote:
Ian Collins wrote:
>VJ wrote:
>>If he makes small unit tests, he can use valgrind on those, and at the
same time test both unit tests and his code

If he has the good sense to produce decent unit tests, adding operator
new() and delete() to the test harness will serve him well. No need for
anything else.

Shit happens, cause noone is perfect, therefore testing for memory leaks
in unit tests is not bad, just takes time and should not be used often.
I think you miss my point, if you provide your own memory manager, you
can have memory leak detection almost free, just by keeping tabs on all
allocated blocks.

The same applies with Sun's dbx, there is next to no overhead running
with memory leak detection enabled. Access violation detection is an
other story.

--
Ian Collins.
Nov 3 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sergey Tursanov | last post by:
Hello all ! When I use code below and check my program with various memory leak detection tools I get message about memory leaks in stl_alloc.h. #include <string> int main() { std::string s...
8
by: __jakal__ | last post by:
Hello, Is there any good memory leak detection software for C++ available as a freeware... I had used purify but had to discontinue due to huge license fees... Also tried Sun workshop memory...
1
by: Spur | last post by:
Hi all, I implemented a memory allocation/deallocation class that logs all new/delete calls (overloaded) and remembers for each allocated block where it was allocated from (using a macro that...
3
by: wavelet | last post by:
a.exe is one programming writen with c/c++ language. a.exe will be called multi-times by another programming. Now I want to check how much memory is used by a.exe or whether some memory leak...
7
by: mosaic | last post by:
Hi, all I really interested in how to check the memory leak of a program. Your smart guys, do you have excellent ideas that could share with me? Thank you. The following is my idea: In C...
0
by: Frank Lopez | last post by:
Does anyone know if Microsoft generated a whitepaper on this topic? Does anyone know what the solution is? (meaning, eliminate the leak problem -- I am seeing three memory leaks from...
3
by: Peter Steele | last post by:
We're doing some development in VS .NET C++ and want to purchase a tool for memory leak detection and related activities. Any recommendations?
0
by: Stephen Kellett | last post by:
Announcing Software Tools for Python We are pleased to inform you that we have completed the port and beta test of our Memory Analysis software tool to support Python. The software tools run on...
16
by: graham.keellings | last post by:
hi, I'm looking for an open source memory pool. It's for use on an embedded system, if that makes any difference. Something with garbage collection/defragmentation would be nice. It should have...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.