Memory leak check utility

Can anybody guide me to any utilities that can be used to check memory leaks. My application runs continously & if there is a memory I might run out of memory one fine day :wink: .

Not a utility, but a tip, I make versions of malloc,free, and realloc which log the number of mallocs/frees, so at any point I can print out the number of mallocs vs. number of frees and see how many unfreed allocations there are, as long as this does not keep rising, all is well. If the leak is something you don’t have control over, then this does not help of course. This works quite well for me.



QNX6 comes with malloc_g library, it’s all in the documentation.

If your interested I’m using a snipped of code, that I use that will tell you what malloc ( by source and line number) didn’t have a matching free. It also check for under and overrun of allocated memory.