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.

有帮助吗?

解决方案

Well, I found that it is not possible with google-heap-tools.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top