0

i saw this page and found that we can check memory leaks of a program using dbx. i never practically did it but it seems a good toll for checking the memory leaks.

i used to work on HPUX and IBM AIX UNIX OS's,where there is no GUI and always used to work on command line. the library rtcaudit.so(for runtime checking) is provided by Sun. does it mean that this library is only available on sun solaris?

you may tell me why cant i try myself.but the problem here is i am not presently working on unix but on windows.I am just eager to know whether we can use the same thing either in HPUX or IBM AIX.

does anybody know about this?Please share it in case you know it

Vijay
  • 65,327
  • 90
  • 227
  • 319

2 Answers2

3
  • rtcaudit.so is part of Oracle Solaris Studio (formerly known as Sun Studio). Despite the name it also runs on Linux x86. So if you have a Linux box and some time you may want to try it there. (In that case you may want to try Valgrind first, see Scotts answer.)

  • For HP there is Wildebeest Debugger (WDB) (a modified gdb). WDB has its own extensions to find memory leaks. While these are different from Suns dbx, you still might want to give it a try.

  • If you are using Visual Studio, it does offer some support to find memory leaks. See Memory Leak Detection and Isolation on MSDN.

  • There are some free Libraries to catch this type of errors. For Windows there are e.g.: DUMA, Electric Fence and Visual Leak Detector. (Can't post the links because I don't have enough reputation points.)

PS: If I run into problems like this, the first thing I try is Valgrind (see Scotts answer). It doesn't require any interaction but simply spits out lots of useful information. While it is not a full debugger, many times it gives enough hints to fix an error. Highly recommended! Does not run on Windows though.

You may want to have a look at this question, this question and this question here at stackoverflow.com.

Community
  • 1
  • 1
Mackie Messer
  • 7,118
  • 3
  • 35
  • 40
3

An open source alternative is Valgrind. This not only detects memory leaks, but also other kinds of memory errors and a bunch of other stuff I've never used. It currently only runs on Linux, MacOS, FreeBSD, and NetBSD, but if your program is not platform dependent then you could develop and debug on one platform before running it on your target platform.

Scott Duckworth
  • 627
  • 4
  • 13