CFanatic

Go Back   CFanatic > Programming > C++ Programming

Join CFanatic Forum Now

Please suggest a C++ source code analysis tool for debugging memory leak topic posted under C++ Programming which is a part of Programming category in CFanatic Forum
Reply
 
Thread Tools Display Modes
  #1  
Old 04-21-2008, 11:38 PM
Junior Member
 
Join Date: Feb 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
tommy_24 is on a distinguished road
| More
Please suggest a C++ source code analysis tool for debugging memory leak

Hi... we are providing software support for one of the famous retailers in U.S. The code has been written in C++. Our field test customers feel that the application software is very slow.
Before we deliver the software to our clients, we are in a urge to improve the performance of the application. Some of our software engineers suspect that the memory dirty pages are too high in the application. They feel that the code have lot of memory leaks. Are there ways to improve the performance of the software?? Is there any tool that finds us the memory leaks in the code? Please suggest?
Reply With Quote
  #2  
Old 04-21-2008, 11:54 PM
Junior Member
 
Join Date: Feb 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
antony is on a distinguished road
| More
you can use Source code analysis tool like Coverity Prevent

Hi, typically, a memory leak occurs because dynamically allocated memory has become unreachable. You can prevent memory leaks by watching for some common problems. Collection classes, such as hash tables and vectors, are common places to find the cause of a memory leak. This is particularly true if the class has been declared static and exists for the life of the application. . The prevalence of memory leak bugs has led to the development of a number of debugging tools to detect unreachable memory. Coverity Prevent is one of the tool that you can use for fixing these kinds of bugs. Coverity Prevent is also used by the Department of Homeland security to scan many open source projects. You can get more info at Coverity Webpage

Last edited by shabbir; 04-22-2008 at 12:34 AM. Reason: Link Dropped
Reply With Quote
  #3  
Old 04-22-2008, 12:33 AM
shabbir's Avatar
Administrator
 
Join Date: Sep 2006
Posts: 1,158
Thanks: 48
Thanked 62 Times in 43 Posts
shabbir has a spectacular aura aboutshabbir has a spectacular aura about
| More
Re: you can use Source code analysis tool like Coverity Prevent

Here is one - Memory Leak detection Program without using any tools
Reply With Quote
  #4  
Old 07-25-2008, 04:34 AM
Senior Member
 
Join Date: Jul 2008
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
xpi0t0s is on a distinguished road
| More
Re: Please suggest a C++ source code analysis tool for debugging memory leak

Memory leaks don't cause software to run slowly, what happens when a program leaks memory is that over time its memory usage grows and grows until eventually it keels over due to lack of memory.
If anything the program runs faster because it isn't freeing objects and so the malloc routines don't have to dig through old released objects to find some memory for you.
Of course as memory usage increases speed will decrease because it has to swap more and more stuff out of memory, and of course an out of memory error is difficult to handle gracefully (most applications just crash).

So if memory isn't increasing, which you can view in top (Unix), or Task Manager (Windows) then you don't have a leak.

If you have performance issues the best place to start is with a code profiler, which will tell you where the software is spending most of its time. Then you know which bits of code need rewriting.
Reply With Quote
  #5  
Old 12-17-2008, 12:33 AM
Member
 
Join Date: Dec 2008
Posts: 48
Thanks: 0
Thanked 1 Time in 1 Post
hkp819 is on a distinguished road
| More
Re: Please suggest a C++ source code analysis tool for debugging memory leak

To solve memory leaks don't use dynamic memory allocation . Of course that would take up quite a bit of unneeded space in the first place but at least the program wouldn't become slower over time. Just joking use DMA wherever you can. So much more efficient.

I use crimson because of it's ftp saving abilities but I don't use it's debugger. I personally do my debugging all on Linux just for stability reasons. The best debugger out for Windows is Microsoft's own Visual C++. Not free by any means but nothing compares to it.
Reply With Quote
  #6  
Old 05-20-2009, 09:49 PM
Junior Member
 
Join Date: May 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Jakarta is on a distinguished road
| More
Smile Re: Please suggest a C++ source code analysis tool for debugging memory leak

tommy_24, I think Deleaker can completely help you to find a memory leaks and other reasons, that can slow down your application.
deleaker(dot)com
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
suggest a c program SAILOLLA Game Development 7 11-20-2011 08:29 AM
Print Japaneese character on Linux terminal & debugging problem rajeshgalla C Programming 0 04-14-2008 03:01 AM
how to use BorlandC++ and openGL to solve finite element analysis? jc23 OpenGL Programming 0 10-01-2006 03:41 AM
Visual Studio hangs during Debugging a thread: PfisterHarald MFC Programming 0 09-13-2006 12:30 PM

 

Advertisement

CFanatic Search
Custom Search

Advertisement

All times are GMT -5. The time now is 04:52 PM.



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO ©2010, Crawlability, Inc.
Cfanatic.com is a premier member of the IDG TechNetwork. For advertising opportunities contact here
Get Paid for Working on Projects Matching Your Expertise at Go4Expert's Jobs Board