关于google-perftools的HEAPCHECK
我需要修复一个巨大的开源库中的漏洞。为此,我正在使用 google-perftools,现在该库已链接到另一个大型应用程序中,这也可能有大量内存泄漏[从应用程序中查找泄漏不是我的目标/工作]那么我如何要求 google HEAPCHECKER 只获取库的内存泄漏而不是应用程序的内存泄漏?
我尝试过的一种方法是:-
我将库与 google-perftools lib 链接起来,但没有明确地将应用程序与其链接。在运行启用了 HEAPCHECK 的应用程序时,它给了我这个错误
检查失败: heap_profile->FindAlloc(test_str, &size): 我们自己的new/delete没有关联?
请帮助我找到解决方案来获取唯一库的内存泄漏。
附言。我的平台是嵌入式linux,我使用gnu链接器和G++编译器。
I need to fix leaks in a huge open-source library. For that I am using google-perftools, Now this library is linked in another big application, which can also have possibaly lots of memory leaks [ Finding leaks from an application is not my goal/job] so how can I ask google HEAPCHECKER to only get the memory leaks of library and not of application?
One approach I have tried is:-
I linked library with google-perftools lib and did not explicitly linked an application with it. and while running an application with HEAPCHECK enabled, It gives me this error
Check failed:
heap_profile->FindAlloc(test_str,
&size): our own new/delete not linked?
Please help me in finding solution to get the memory-leaks of only library.
PS. My platform is embedded linux and I am using gnu linker and G++ compiler.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我发现用 google-heap-tools 是不可能的。
Well, I found that it is not possible with google-heap-tools.