Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Memory leak detection tools?

This thread is locked; no one can reply to it. rss feed Print
Memory leak detection tools?
Indeterminatus
Member #737
November 2000
avatar

Hi guys!

I was searching the internet for memory leak detection tools, but I simply didn't find anything useful. Most of the memleak-tools require linux or are C-only.

I'm using Dev-C++ 5 (the newest beta) along with the packed MinGW. Do any of you guys know a good memleak-tool? If so, please post it here, I guess this will be useful for other people besides me, and as far as I have seen, this question never came up on this forum.

Indeterminatus.
-si tacuisses, philosophus mansisses-

_______________________________
Indeterminatus. [Atomic Butcher]
si tacuisses, philosophus mansisses

Richard Phipps
Member #1,632
November 2001
avatar

Search for Fortify. (I don't have a link)

It tries to catch malloc errors and seems pretty good.

Ron Ofir
Member #2,357
May 2002
avatar

there are libraries such as LibGC.

Indeterminatus
Member #737
November 2000
avatar

Got it, thanks a lot! Haven't tested it out yet, but for those interested: Here's the link http://www.geocities.com/SiliconValley/Horizon/8596/fortify.html.

Indeterminatus.
-si tacuisses, philosophus mansisses-

_______________________________
Indeterminatus. [Atomic Butcher]
si tacuisses, philosophus mansisses

Karadoc ~~
Member #2,749
September 2002
avatar

I wrote my own little piece of memory management code for C.
I use it in pretty much all my programs in one form or other.

You're welcome to take a look at it, or even use it if you think it would be useful. It's quite simple, but effective.

-----------

gillius
Member #119
April 2000

What did you compress that with? Winzip 8.1 (full version) says the file was compressed with an unsupported compression type "12".

EDIT: I was able to use my copy of 7-zip to do it. I forgot I had that.

Gillius
Gillius's Programming -- https://gillius.org/

Daniel Schlyder
Member #257
April 2000
avatar

An alternative to Fortify (for C++) is the debug_new part of NVWA: http://sourceforge.net/projects/nvwa/. I think I started using this cause Fortify didn't work too well with some of my more advanced C++ code.

ReyBrujo
Moderator
January 2001
avatar

Or MSS. Google for it.

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

gillius
Member #119
April 2000

MSVCRT*.dll has a memory leak and memory bounds checking facility in it that is pretty good. I've used it before in MSVC. Someone else was asking in another thread for a memory leak tool, and I posted a link there. You can find details from MSDN. I'll repost if requested.

Gillius
Gillius's Programming -- https://gillius.org/

ReyBrujo
Moderator
January 2001
avatar

You can try otherwise Numega BoundChecker. It is a very interesting tool, though you must buy it. It detects memory leaks in executables, and if it is compiled in debug, it shows you the code where you are leaking.

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

A J
Member #3,025
December 2002
avatar

msvc7.1 has 'buffer overrun protection' which i guess is a memory leak type of tool, however it will not find things like leak ptr memory.. that is best handled by smart pointers and the like.

___________________________
The more you talk, the more AJ is right. - ML

gillius
Member #119
April 2000

No it actually WILL find leaks if you call the proper CRT functions, like _CrtSetDbgFlag. I couldn't find the original article that I found this in, but I found this article on FlipCode, and if you search on MSDN for the above function you can find all of the other things it can do.

Gillius
Gillius's Programming -- https://gillius.org/

Karadoc ~~
Member #2,749
September 2002
avatar

Quote:

What did you compress that with? Winzip 8.1 (full version) says the file was compressed with an unsupported compression type "12".

EDIT: I was able to use my copy of 7-zip to do it. I forgot I had that.

Yeah, I actually used 7-zip to do it. Maybe I should pay more attention to what sort of compression I'm using; I sort of just selected the files and pressed 'go' without thinking much about it.

-----------

Go to: