Cameron Laird's personal notes on memory debuggers
In 2007, I began relocating much of the information here to the
Memfix
publications page.
Many of the organizations I've advised
have profited from "memory
debuggers", testing tools that validate applications' use of
stack and heap spaces. I like these tools; they generally
exhibit a kind of procedural clarity that I
recommend with enthusiasm. I mean "clarity" here on two levels:
memory debuggers have modest costs and immediate, tangible
benefits both as business investments and in the daily
work cycle of a developer.
The best current profile of memory debuggers appears in the
Wikipedia
article on the subject. Also valuable is the companion article on
buffer
overflows, which, along with much else, documents available
"safe libraries" for C and C++ (and, to a lesser extent, other
languages). I recommend ...
Until its last update in February 2001, Ben Zorn's
Debugging
Tools for Dynamic Storage Allocation and Memory Management
was more ambitious and current than this page of mine.
It has grown stale since then, though.
Unix-available (nearly-) open-source memory tools
More than Mr. Zorn, I favor Unix-oriented, and open-source,
tools. The latter include:
In principle Checker and mpatrol are admirably portable. I've found
the latter unmaintained, and the former unready. In a pinch, I
can make use of either. valgrind, in contrast, though it
targets only x86, is potent, with considerable care devoted to
intelligent handling of threads.
Unix-available commercial tools
Toward the end of 1994, the now-defunct Advanced Systems magazine
reviewed
the principal offerings for Unix developers:
The review favored Insure (called Insight at the
time) heavily, and rated Purify third; moreover, I'm
acquainted with several developers who agree that Purify
suffered immediately after its parent's acquisition by
Rational. I
remain comfortable with Purify, at least in its more recent
versions. Parasoft
itself has also distributed useful
comparisons
of the three offerings.
Other possibilities: the
CenterLine, Hewlett-Packard,
and SunSoft IDEs:
? ,
SoftBench and
Workshop,
respectively. They all have
great feature sets, the latter at a remarkably competitive price,
but I'm wary about each. My experience with CenterLine is that
it's just too much--too big, too slow, too complex, too costly. It's a
marvelous technical achievement, and CenterLine improves it
significantly with each release, but they haven't yet hit a
combination that appeals to me for daily development work.
I have yet to use Sun's IDE in other-than-toy development, so
I can't judge its industrial strength. Also, I've solved sticky
problems in the past with such freeware as
dmalloc.
The Windows world
- AQtime 4
has received strong recommendations from colleagues I trust.
- BoundsChecker
from Compuware
(originally NuMega)
promotes itself as "the premier run-time error detection and debugging
tool for C++ developers."
- Deleaker
profiles memory for
Windows-based applications in C++, C#, Delphi and .Net more generally.
While I haven't yet experimented with it myself, free trials are available,
I have evidence it's actively supported in 2020, it integrates with
Visual Studio, and
the
testimonials I've read touch me. It might be months before I have a
chance to test it adequately. In the meantime, I want others to be aware
of its availability, and I welcome any reports of personal experience
with Deleaker.
- Software Verification's
Memory Validator
looks promising. One correspondent has testified to its ease of
use and inexpensive license, in comparison with BoundsChecker,
Purify, and Insure++. Software Verification developer Stephen Kellett
tells
more
about his creation.
- VERITAS Software's
VERITAS
Application Saver
incorporates and, one hopes, improves on what was once known
as Geodesic's
Great
Circle. Great Circle not only analyzed, but even rectified
memory usages
[through GC?]. In April 1998, Richard Brooksby of Geodesic
explained to me
As well as providing leak detection
(like Purify, etc.) Great Circle can
indeed rectify memory leaks in order to provide "leak insurance" for
applications, in case the developers fail to find and fix all their leaks
during testing. Alternatively, it can be used in "garbage collection mode"
in which case you don't need to call free at all. There is usually no
performance penalty for either rectifying or collecting, and our
performance is significantly better than Purify for leak detection. Our
web page explains some of this
in the FAQ.
Great Circle is also available on a variety of Unix platforms. ...
categorized under Windows only. The web page lists the platforms currently
supported:
- Windows 3.1/95/NT: Microsoft Visual C++ 1.5x/4.x/5.x
- SunOS 4.1x: SPARCworks (Sun C++) or g++
- Sun Solaris 2.x: SPARCworks or g++
- HP-UX 9.0.x: Softbench (HP C++) or g++
- HP-UX 10.01/10.10: Softbench (HP C++)
- DEC Alpha Digital UNIX: DEC C/C++
More platforms are in the pipeline.
- ...
Magazines review these products monthly; there's plenty written about
them, although nothing readily link-able here.
Acknowledgments
Particular thanks to Eric Anderson for his initiative and clarity
in collecting information for this page.
Cameron
Laird's notes on
memory debuggers/claird@phaseit.net