哪个 C++使用分析器?
我正在支持 C/Cpp 应用程序,并通过创建对象解决了一些内存泄漏问题。由于它是由第三方 API 提供的,因此被告知对象会被 API 本身破坏。
我可以设法解决问题并测试我的应用程序,没有任何问题。但我仍然怀疑我对内存泄漏的修复。我想要进行分析,并且需要一个 Cpp 工具,它可以告诉我给定 CPP 文件的代码中是否存在内存泄漏的可能性。
有这样的工具吗?非常感谢任何帮助。
谢谢, ~杰根
I am supporting a C/Cpp application and have resolved few memory leak issues by creating objects. Since it is provided by the third party API, it is told that the objects gets destructed by the API itself.
I could manage to fix the issue and test my application without any issue. But i still doubt my fix for memory leak. I want to do profiling and i am in need of a Cpp tool that can tell me if there are chances of memory leaks in the code given a CPP file.
Is there a tool of that sort? Any help is greatly appreciated.
Thanks,
~Jegan
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可能正在寻找动态分析工具,而不是配置文件。对于 Linux,有 valgrind。对于 Windows,一些好的商业解决方案是 Purify 和 Insure++。
You are probably looking for a dynamic analysis tools, not a profile. For Linux, there's valgrind. For windows some good commercial solutions are Purify and Insure++.
尝试一下valgrind,它是迄今为止我遇到过的最好的内存分析工具。它只能在 *nix 上运行,但你还没有说明你的平台。
Give valgrind a try, it's by far the best memory analysis tool I've come across. It only runs on *nix, but you haven't stated your platform.
我们使用 http://www.softwareverify.com/ 中的 MemoryValidator。
它提供功能齐全的 30 天试用期,因此您可以在购买前进行测试。
单个许可证起价 179 美元(每个许可证 10 个许可证),最高 299 美元(1 个许可证)。而且它真的很值得它的价格。使您能够在一分钟内找到泄漏原因。
还要检查他们提供的其他工具:性能验证器、错误验证器等。
一旦你知道如何处理它,这是一个很棒的工具:-)
We're using MemoryValidator from http://www.softwareverify.com/.
It provides a fully functional 30 day trial, so you can test it before buying.
Single license from 179$ (each for 10 licenses), up to 299$ (1 license). And it is really worth it's price. Enables you to find the cause for leaks within a minute.
Also check the other tools they're providing: performance validator, bug validator and so on.
Great tool once you know how to handle it :-)