简体   繁体   中英

Instruments to check for leaks in C?

I just upgraded to Mac OS X Mountain Lion and found out that valgrind is still not compatible with Mountain Lion.

I have a 600 line C code that I need to check against memory leaks.

What are possible ways to do it other than valgrind? Can I use Xcode instruments?

You could check the clang static analyzer . It's pretty awesome tool for finding bugs in the code.

It's better than valgrind in the fact that it does static analysis rather than running the code — so it can find bugs which you rarely reach. However, it is more likely to trigger false positives as well. And it's not as mature as valgrind.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM