Debugging Tools for
Dynamic Storage Allocation and Memory Management

This list is maintained by Ben Zorn, who is now working at Microsoft Research, in Redmond, WA.

This list is not intended to be comprehensive, however I am happy to add missing entries when I am made aware of them. If you have additional tools that I should note here, please send email to zorn@microsoft.com.


There is further information on the following topics:


Boehm-Weiser Conservative Garbage Collector

A garbage collecting storage allocator that is intended to be used as a plug-in replacement for C's malloc. Since the collector does not require pointers to be tagged, it does not attempt to ensure that all inaccessible storage is reclaimed. However, in our experience, it is typically more successful at reclaiming unused memory than most C programs using explicit deallocation. Unlike manually introduced leaks, the amount of unreclaimed memory typically stays bounded. This implementation has been ported to many architectures and operating systems.

Contact Person: Hans Boehm (boehm@acm.org)

WWW Site: http://www.hpl.hp.com/personal/Hans_Boehm/gc/


ccmalloc

ccmalloc (latest version 0.3.2) is a version of malloc that links with C and C++ programs that will log memory leaks in the program after it ends.  It does not detect illegal memory reads, as some other commercial tools will.  It is distributed under the GPL and has been tested on Linux and Solaris

Contact: Armin Biere

WWW Site: http://www.inf.ethz.ch/personal/biere/projects/ccmalloc/


Centerline TestCenter

TestCenter detects memory leaks, duplicate frees, and illegal access errors including stores past the end of heap-allocated objects and loads from uninitialized objects. It works by directly modifying the program object files when they are linked together. It also provides line coverage and function coverage. Error simulation allows simulating return values or error codes for any function to test for failure behavior. Supported platforms include SunOS, Solaris, HPUX, and AIX (as of version 2.1.0).

Contact: Commercially available from Centerline, Inc.

WWW Site: http://www.centerline.com/productline/test_center/test_center.html


Centerline ObjectCenter

ObjectCenter detects memory leaks, duplicate frees, and illegal access errors on the heap, stack, and in static memory, in C and C++. These include reads/stores past the end of an array, including arrays inside structs and classes. It also detects illegal cast and downcast errors, and inconsistent cross-module definitions. It works by instrumenting source code at compile time.  Supported platforms include SunOS, Solaris, HPUX, and NCR (as of version 2.2).

Contact: Commercially available from Centerline, Inc.

WWW Site: http://www.centerline.com/productline/object_center/object_center.html


dbmalloc, by Connor Cahill

This is patchlevel 14 of a malloc debugging library. This library contains a plug-compatible replacement for the standard dynamic memory allocation routines and other important C modules, such as string manipulation, that are typically used to access and/or manipulate heap-allocated memory. The replacements function almost identically to the original functions except that in addition they perform significant error checking.

WWW Site:ftp://ftp.digital.com/pub/usenet/comp.sources.misc/volume32/dbmalloc/


Debug Malloc Library, by Gray Watson

The debug memory allocation or "dmalloc" library has been designed as a drop in replacement for the system's `malloc', `realloc', `calloc', `free' and other memory management routines while providing powerful debugging facilities configurable at runtime. These facilities include memory-leak tracking, fence-post write detection, file/line number reporting, and general logging of statistics. The library is portable and has been run successfully on at least the following operating systems: AIX, BSDI, DG/UX, HPUX, Irix, Linux, MS-DOG, OSF, Solaris, SunOS, and Ultrix. Version 4.7.1, July 2000.

Contact Person: Gray Watson (http://256.com/gray/)

FTP Site: http://www.dmalloc.com


Electric Fence, by Bruce Perens

Electric Fence is a freely available and easy to use malloc() debugger, which can be used simply by placing its library in the appropriate position in an application's shared-library path.  (From the README file for version 2.0.5) Electric Fence is a different kind of malloc() debugger. It uses the virtual memory hardware of your system to detect when software overruns the boundaries of a malloc() buffer. It will also detect any accesses of memory that has been released by free(). Because it uses the VM hardware for detection, Electric Fence stops your program on the first instruction that causes a bounds violation. It's then trivial to use a debugger to display the offending statement. The 2.0.5 version runs on a large number of Unix platforms including Linux, Solaris, HP/UX, and OSF.

Contact Person: Bruce Perens (Bruce@Pixar.com)

WWW Site: http://sunsite.unc.edu/pub/Linux/devel/lang/c/ElectricFence-2.0.5.tar.gz


Geodesic Systems Great Circle

Great Circle provides automatic memory management, i.e., garbage collection, in C and C++ programs. The product provides two different memory allocation interfaces called GCTransparent, which performs transparent garbage collection simply through relinking an application; and GCPointers, which uses ``smart pointers'' (aka reference counting) for storage reclamation.

Contact: Commercially available from Geodesic Systems

WWW Site: http://www.geodesic.com/solutions/greatcircle.html


MemCheck, by StratosWare Corp.

MemCheck detects and reports memory related errors in C and C++ programs, including overwrites, leaks, heap corruption, Win API parameter errors, duplicate frees, etc.

Contact: Commercially available from StratosWare Corporation

WWW Site: http://www.stratosware.com/products/MemCheck32/index.htm


Memdebug, by Rene Schmit

Memdebug is a free utility for C programmers that provides, among others, the following features: memory management error detection (including memory leaks), memory usage error detection (including accesses to previously free()'ed memory, off-by-one errors in memory blocks, etc), memory usage profiling, and low memory simulation for testing purposes.

Contact Person: Rene Schmit (rene.schmit@bss.lu

FTP Site: http://www.bss.lu/Memdebug/Memdebug.html


mpatrol, by Graeme Roy

mpatrol (version 1.4.0) is a freely-available memory allocation library for C and C++ that provides extensive debugging, profiling and tracing capabilities to help fix memory allocation errors and monitor memory allocation behavior. It can detect heap corruption using overflow buffers, virtual memory protection or software watchpoints on supported systems, and can also help pinpoint memory leaks with their associated symbolic stack tracebacks. mpatrol comes with a suite of utility programs, is supported with extensive documentation and works with numerous platforms including most varieties of UNIX, Linux and Windows.

Contact Person: Graeme S. Roy

Web Site: http://www.cbmamiga.demon.co.uk/mpatrol/


Mprof, by Ben Zorn

Mprof is a publicly available tool that can be used to determine what functions are allocating heap data in C and C++ programs. Mprof also provides information about the locations of memory leaks in programs. Mprof is similar in design and use to gprof, the execution profiling tool. Version 3.0.

Contact Person: Ben Zorn (zorn@cs.colorado.edu)

FTP Site: /anonymous@gatekeeper.dec.com:/pub/misc/mprof-3.0.tar.Z


ParaSoft Insure++

Among other things, Insure++ detects many kinds of runtime programming errors, including memory-related errors in C and C++ programs. The tool works by preprocessing the source and thus provides feedback in terms of the source program. The company also provides an add-on module called ``Inuse'' that visually displays information about the memory usage of programs.

Contact: Commercially available from ParaSoft Corporation

WWW Site: http://www.parasoft.com/products/insure/index.htm


Purify, by Rational Software

Purify detects memory leaks, duplicate frees, and illegal access errors including stores past the end of heap-allocated objects and loads from uninitialized objects. It works by directly modifying the program object files when they are linked together. Purify is available for Windows and many Unix platforms.

Contact: Commercially available from Rational Software

WWW Site: http://www.rational.com/products/purify_nt/index.jsp


QC, by Onyx Technology

QC is a tool that stress-tests applications during runtime. In particular, QC is specifically designed to make memory related bugs reproducible. Although in most cases QC can report the bug very near its actual occurance, the primary focus of QC is to cause memory related problems to occur in a consistant manner. QC currently supports the following tests: Crossref Master Pointers, Validate Handle/Ptr, Detect Write to Zero, Dereferencing Zero, Reasonable Allocations, Check Dispose/Release, BlockMove Checking, Block Bounds Checking, MemErr Detection, Grow Lock, Grow non-Reloc, Scramble Heap, Purge Heap, Check Heap, Invalidate Free Memory, Test System Heap.

Contact: Commercially available from Onyx Technology

WWW Site: http://www.onyxtech.com/products/qc.html


Sentinel 1.5, by AIB Software Corporation

Sentinel 1.5 detects memory leaks, duplicate frees, and illegal access errors including stores past the end of heap-allocated objects and loads from uninitialized objects. It also implements data watchpoints.

Contact: Commercially available from AIB Software Corporation

e-mail: info@aib.com, phone: (800) 296-3000, (703) 430-9247

FTP Site: /anonymous@ftp.uu.net:/vendor/AIB/


Sentinel II, by AIB Software Corporation

Sentinel II detects memory leaks, duplicate frees, and illegal access errors including stores past the end of heap-allocated objects and loads from uninitialized objects in dynamic and global data. It also implements data watchpoints. It works using a platform-independent technology called Object Module Transformation (OMT).

Contact: Commercially available from AIB Software Corporation

e-mail: info@aib.com, phone: (800) 296-3000, (703) 430-9247

FTP Site: /anonymous@ftp.uu.net:/vendor/AIB/


SmartHeap, by MicroQuill

SmartHeap is a plug-compatible replacement for malloc/free that is portable and high-performance. It also provides a debugging API to find bugs in malloc/free code. Another product of the company, HeapAgent, supports finding memory-related bugs in programs without the need to recompile applications.

Contact: Commercially available from MicroQuill Software Publishing

WWW Site: hhttp://www.microquill.com/prod_sh/index_sh.htm


Spotlight, by Onyx Technology

Spotlight is a stand-alone debugging aid that performs memory protection (arrays, heap accesses, outside your heap, low memory, etc), discipline checking on toolbox calls, and leak detection.  Spotlight runs on PowerPC Macintosh systems.

Contact: Commercially available from Onyx Technology

WWW Site: http://www.onyxtech.com/products/spotlight.html


ZeroFault, by The Kernel Group

ZeroFault uses a patent pending virtual machine emulation technology that provides access to all system resources in the program's runtime environment. It detects and reports run-time memory problems, such as memory leaks, duplicate frees, and illegal access errors on the heap, stack, and in static memory. No source code, symbols, or recompiling are required. It works on stripped executables as well. Since it works on the binary, any source language can be accomodated. Threads (any kind) are also not a problem. ZerofFault will also detects errors in third party and system libraries.

Contact: Commercially available from The Kernel Group, Inc.

WWW Site: http://www.TKG.com/zf


This page is maintained by Ben Zorn (zorn@microsoft.com).