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

2019-01-28 04:30发布

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

4条回答
Bombasti
2楼-- · 2019-01-28 04:44

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.

查看更多
叛逆
3楼-- · 2019-01-28 04:48

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.

查看更多
聊天终结者
4楼-- · 2019-01-28 05:09

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.

查看更多
我只想做你的唯一
5楼-- · 2019-01-28 05:11

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

查看更多
登录 后发表回答