Skip to main content
gamedev.net
🔒 Locked

Tools for checking memory leaks?

Started by csolar Jul 5, 2004 at 12:43 AM 8 replies 1.1k views
Original Post
csolar
csolar
Im working on a complicated program that loads a bunch of stuff up at runtime and (hopefully) destroys everything when stopped. The information I mostly use is in the form of poctures and the like. I was wondering if theres a helpful tool out there for me to use to make sure that everything allocated gets destroyed. In otherwords, checks to make sure my program does not have a memory leak. Does anyone know of such a program? And if so, where can I find one? Thanks, Charles
They can write what they like, so long as I get the royalties.
xiuhcoatl
xiuhcoatl
Boundschecker used to be pretty good. I was sort of preferential to Purify. Both are a little expensive though...


#dth-0
"C and C++ programmers seem to think that the shortest distance between two points is the great circle route on a spherical distortion of Euclidean space."Stephen Dewhurst
stay in school
stay in school
I like Memory Validator for windows. The free trial is either 2 weeks or 1 month - can't remember. I found it very easy to use.
ibawt
ibawt
How about Electric Fence? It's free....or better yet redefine malloc and free to your own functions and just count the number of allocations versus free's.
Raduprv
Raduprv
Quote:
Original post by ibawt
How about Electric Fence? It's free....or better yet redefine malloc and free to your own functions and just count the number of allocations versus free's.


This technique somewhat works for memory leaks, but it's totally ineffective against other type of memory problems, such as memory violations.
ibawt
ibawt
Quote:
Original post by Raduprv
Quote:
Original post by ibawt
How about Electric Fence? It's free....or better yet redefine malloc and free to your own functions and just count the number of allocations versus free's.


This technique somewhat works for memory leaks, but it's totally ineffective against other type of memory problems, such as memory violations.


I believe the orignal poster asked for "Memory Leak detection"
Raduprv
Raduprv
Sure, but why not get a tool that does more than that? Memory leaking is relatively easy to detect, as opposed to:
1. access violations
2. reading from unitialized memory

Valgrind solves all those problems, plus many more. But unfortunately it works only on Linux.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.