Memory debugger

Software memory problem finder


title: "Memory debugger" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["memory-management-software", "debugging"] description: "Software memory problem finder" topic_path: "technology/software-engineering" source: "https://en.wikipedia.org/wiki/Memory_debugger" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0

::summary Software memory problem finder ::

A memory debugger is a debugger for finding software memory problems such as memory leaks and buffer overflows. These are due to bugs related to the allocation and deallocation of dynamic memory. Programs written in languages that have garbage collection, such as managed code, might also need memory debuggers, e.g. for memory leaks due to "living" references in collections.

Overview

Memory debuggers work by monitoring memory access, allocations, and deallocation of memory. Many memory debuggers require applications to be recompiled with special dynamic memory allocation libraries, whose APIs are mostly compatible with conventional dynamic memory allocation libraries, or else use dynamic linking. Electric Fence is such a debugger which debugs memory allocation with malloc. Some memory debuggers (e.g. Valgrind) work by running the executable in a virtual machine-like environment, monitoring memory access, allocation and deallocation so that no recompilation with special memory allocation libraries is required.

Finding memory issues such as leaks can be extremely time-consuming as they may not manifest themselves except under certain conditions. Using a tool to detect memory misuse makes the process much faster and easier.

As abnormally high memory utilization can be a contributing factor in software aging, memory debuggers can help programmers to avoid software anomalies that would exhaust the computer system memory, thus ensuring high reliability of the software even for long runtimes.

Comparison to static analyzer

Some static analysis tools can also help find memory errors. Memory debuggers operate as part of an application while its running while static code analysis is performed by analyzing the code without executing it. These different techniques will typically find different instances of problems, and using them both together yields the best result.

List of memory debugging tools

This is a list of tools useful for memory debugging. A profiler can be used in conjunction with a memory debugger.

::data[format=table]

NameOSLicenseLanguagesTechnique
AddressSanitizerLinux, Mac OSFree/open source (LLVM)C, C++, RustCompile-time instrumentation (available in Clang and GCC) and specialized library
Allinea DDTLinux, Blue GenecommercialC, C++ and F90. Also for parallel programs on supercomputersRuntime - through dynamic linking
AQtimeWindows (Visual Studio, Embarcadero IDEs)commercial.NET, C++, Java, Silverlight, JScript, VBScriptRuntime
BcheckSolaris
BoundsCheckerWindows (Visual Studio)commercialC++Runtime intercepts or compile-time
Daikonurl=http://groups.csail.mit.edu/pag/daikon/download/doc/daikon.htmltitle=The Daikon Invariant Detector User Manual}}Free/open sourceJava, C/C++, Perl, and Eiffel
Debug_new(general technique)(general technique)C++Compile-time override
DeleakerWindows (standalone, and plugins for Visual Studio, RAD Studio, Qt Creator, CLion)commercialC++, .Net, DelphiRuntime intercepts
dmallocFree/open source (ISC License)CCompile-time override
Android, Linux, WindowsFree/open source (LGPL and BSD)Runtime intercepts
Electric FenceUnixC, C++Compile-time override
FASTMM4WindowsDelphiCompile-time override
IBM Rational PurifyUnix, WindowscommercialC++, Java, .NETRuntime
Insure++Windows (Visual Studio plugin), UnixcommercialC, C++source code instrumentation
Intel InspectorWindows (Visual Studio), LinuxcommercialC, C++, FortranRuntime
libcwdLinux (gcc)Free/open sourceC, C++Compile-time override
libumemSolarisBundled with SolarisLink-time override
Memwatch(programming library)Free/open sourceCCompile-time override
mtraceGNU C libraryBuilt-in, outputs accesses
MTunerC, C++Runtime intercepts, Link-time override (MSVC, Clang and GCC), Leak detection
Oracle Solaris Studio (formerly Sun Studio Runtime Checking)Linux, SolarisProprietary freewareC, C++, Fortran
OLIVER (APT international)MVS, MVS/EXA, DOS/VSEsoftwareIBM AssemblerRuntime intercepts, Hypervisor - Type 2
TotalViewUnix, Mac OS XcommercialC, C++, FortranRuntime
Linux, FreeBSD, Solaris/illumos, Mac OS, AndroidRuntime intercepts
WinDbgWindowsfreewareC, C++, .NET, PythonRuntime
::

References

  • Michael C. Daconta: C++ Pointers and Dynamic Memory Management, John Wiley & Sons,
  • Andrew Koenig: C Traps and Pitfalls, Addison-Wesley,

References

  1. (20 November 2015). "Review: 5 memory debuggers for Linux coding".
  2. "Dynamic Analysis vs. Static Analysis".
  3. "Managed Code - AQtime Pro | SmartBear".
  4. "The Daikon Invariant Detector User Manual".
  5. "The Daikon Invariant Detector User Manual".

::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::

memory-management-softwaredebugging