Memory introspection

Doug Lea's dlmalloc page, which is very interesting, is at:

libdlmalloc is the default memory allocator for most Linux distributions at this time.

Phil Ehrens makes available at "a thread safe version of dlmalloc which also exposes a couple of useful functions at the tcl layer so you can watch it work". mirrors it.

PSE- This library is being used to handle the memory allocation on all of our Solaris systems (up to 8 cpu's) and is stable and works exactly as advertised.

All of our production Linux systems are, for better or worse, running RedHat 7.1, and this distro uses it's own thread-patched version of libdlmalloc for ALL memory alocation.

Tcl itself provides memory introspection through the memory command. This command will be enabled only if Tcl was compiled with the MEM_DEBUG preprocessor flag defined (-DMEM_DEBUG).

A commercial tool for memory introspection and checking is Purify:

Purify does not and never will support GCC*

A commercial tool for memory introspection and checking that DOES support gcc, and works very well, is Insure:

AMG: (*) Really? Here [L1 ] is a mention of Purify supporting 32-bit gcc 3.1 on HP/UX.

An open source memory checker: Electric Fence

Which is now under the new name DUMA

C++ Heap Map : A small malloc() and free() interceptor library (, 45 lines of C++) and minimalistic Tcl/Tk GUI for visual C++ heap analysis — a powerful tool for disputes settlement and curiosity satisfaction.