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?
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
Re: you can use Source code analysis tool like Coverity Prevent Here is one - Memory Leak detection Program without using any tools
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.
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.
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