[Gllug] My and my malloc() problems....

Nix nix at esperi.demon.co.uk
Sun Dec 30 17:25:37 UTC 2001


On Sat, 29 Dec 2001, kieran at esperi.demon.co.uk moaned:
> I went looking.  Rational, the makers of purify, apparently don't do a
> linux version.

Indeed. There's not that much point anymore; free replacements exist for
much (but alas, not all) of what Purify does.

> Is there a similar tool which does run on Linux?

A bundle of them. Bruce Perens's ElectricFence is a wildly inefficient
(by design) malloc() replacement at can find malloc()-overrun errors.

The dmalloc library is a ludicrously customizable debugging malloc
replacement that can do everything ElectricFence can do and more besides
(memory leak detection and so forth).

The superb Boehm garbage collector can do memory leak detection (but not
overrun detection). Some projects use the boehm-gc solely for its memory
leak spotting, not for its garbage-collection abilities at all.

Versions 2.2 and above of the GNU C library contain a memory leak
detector (see the `Allocation Debugging' node in the libc info pages)
and a fairly good malloc()-overrun detector (see the `Heap Consistency
Checking' node). It's also got a documented infrastructure for writing
memory leak detectors and so forth.

There also seems to be a project called NJAMD, on SourceForge, but I've
never looked at it.

And finally, Greg McGary is working on bounded pointers for GCC; a
fat-pointer scheme permitting extensive compile-time and runtime
diagnostics of pointer problems on most (if not all) platforms supported
by GCC. There is a branch with his work in it in GCC CVS.

-- 
`Mmm... Maybe I just like strong women that can hurt me?'
     --- Vadik, on female throat-cutting doctors

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list