开发者

Detect memory leaks in dbx with new and delete operators

I'm very interested in using Sun Studio to detect memory leaks in C++ applications with dbx debugger but I think this debugger only shows memory leaks produced by malloc/realloc a开发者_运维技巧nd free; I'm not sure about this but I've tried with a C++ program and I've obtained no memory leaks. In this case, I'd try Valgrind. If I've done something wrong (high possibility) How do I debug C++ applications?

Thanks.


Well some points which you need to make sure,first,the application you traces do have any memory leak.if not then profiler won't show anything.If there is a leak and profiler is not capturing then need to check how you doing it. So valgrind is another best option you can try.So when you say "something wrong (high possibility) How do I debug C++ applications?" do you mean only relevant to debugging memory leak issue or in general debugging of C++ application?If its memory leak related then you can rely on valgrind,else you can also look at AIX malloc trace as well.Here is the URL for it:

http://publib.boulder.ibm.com/infocenter/aix/v6r1/index.jsp?topic=/com.ibm.aix.genprogc/doc/genprogc/malloc_trace_debug.htm

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜