开发者

tools to determine memory leak in a c/c++ code [closed]

开发者 https://www.devze.com 2023-02-15 00:32 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.

Closed 9 years ago.

开发者_如何学Python Improve this question

On the unix environment, are there any tools which can easily analyse the code and mention there is a chance of memory leakage in certain sections of the code. HPUX/AIX/Solaris


If you're talking about static analysis then there's cppcheck (among many others)

If you're talking about a runtime checker (which will be way more accurate and reliable than static analysis) there's valgrind

There's loads of other tools available. Check out the links above for more information

Purify will work on AIX (though it's not free.

HP has the wdb debugger, and it's capable of detecting memory leaks.


I use Insure and it works well. For more information use http://www.parasoft.com/jsp/products/article.jsp?articleId=530


Although not a specialized tool for detecting memory leaks another option is the Boehm-Demers-Weiser garbage collector available from HP Labs.

It works as a replacement for new and malloc.

Here are instructions to use it as a leak detector. It is, or was, used by Mozilla as a leak detector for Firefox. If i recall correctly it was also used by Mono and DotGNU Portable.NET as a gc.


I also use this tool regularly and it has solved many problems for me instantly. This is one tool which I have created for identifying memory leaks in solaris unix. Here it is. The way to run it also mentioned here clearly.

0

精彩评论

暂无评论...
验证码 换一张
取 消