fbpx
Wikipedia

Memory debugger

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 edit

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.[1]

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 edit

Some static analysis tools can also help find memory errors. Memory debuggers operate as part of an application while it's 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.[2]

List of memory debugging tools edit

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

Name OS License Languages Technique
AddressSanitizer Linux, Mac OS Free/open source (LLVM) C, C++. Compile-time instrumentation (available in Clang and GCC) and specialized library
Allinea DDT Linux, Blue Gene Proprietary commercial C, C++ and F90. Also for parallel programs on supercomputers Runtime - through dynamic linking
AQtime Windows (Visual Studio, Embarcadero IDEs) Proprietary commercial .NET, C++, Java, Silverlight, JScript, VBScript[3] Runtime
Bcheck Solaris
BoundsChecker Windows (Visual Studio) Proprietary commercial C++ Runtime intercepts or compile-time
Daikon Unix, Windows, Mac OS X[4] Free/open source[5] Java, C/C++, Perl, and Eiffel[4] Runtime dynamic invariant detection
Debug_new (general technique) (general technique) C++ Compile-time override
Deleaker Windows (standalone, and plugins for Visual Studio, RAD Studio, Qt Creator, CLion) Proprietary commercial C++, .Net, Delphi Runtime intercepts
dmalloc Any Free/open source C Compile-time override
DynamoRIO § Dr. Memory Android, Linux, Windows Free/open source (LGPL and BSD) Any Runtime intercepts
Electric Fence Unix GNU GPL C, C++ Compile-time override
FASTMM4 Windows GNU GPL Delphi Compile-time override
IBM Rational Purify Unix, Windows Proprietary commercial C++, Java, .NET Runtime
Insure++ Windows (Visual Studio plugin), Unix Proprietary commercial C, C++ source code instrumentation
Intel Inspector Windows (Visual Studio), Linux Proprietary commercial C, C++, Fortran Runtime
libcwd Linux (gcc) Free/open source C, C++ Compile-time override
libumem Solaris Bundled with Solaris Link-time override
Memwatch Any (programming library) Free/open source C Compile-time override
mtrace Various GNU LGPL GNU C library Built-in, outputs accesses
MTuner Various Free C, C++ Runtime intercepts, Link-time override (MSVC, Clang and GCC), Leak detection
Oracle Solaris Studio (formerly Sun Studio Runtime Checking) Linux, Solaris Proprietary freeware C, C++, Fortran
OLIVER (APT international) MVS, MVS/EXA, DOS/VSE Proprietary software IBM Assembler Runtime intercepts, Hypervisor - Type 2
TotalView Unix, Mac OS X Proprietary commercial C, C++, Fortran Runtime
Valgrind § Memcheck Linux, Mac OS, Android GNU GPL Any Runtime intercepts
WinDbg Windows Proprietary freeware C, C++, .NET, Python Runtime

See also edit

References edit

  • Michael C. Daconta: C++ Pointers and Dynamic Memory Management, John Wiley & Sons, ISBN 0-471-04998-0
  • Andrew Koenig: C Traps and Pitfalls, Addison-Wesley, ISBN 0-201-17928-8
  1. ^ "Review: 5 memory debuggers for Linux coding". 20 November 2015. Retrieved August 24, 2017.
  2. ^ "Dynamic Analysis vs. Static Analysis". Retrieved August 24, 2017.
  3. ^ . Archived from the original on 2013-09-19. Retrieved 2013-01-14.
  4. ^ a b "The Daikon Invariant Detector User Manual".
  5. ^ "The Daikon Invariant Detector User Manual".

External links edit

memory, debugger, this, article, needs, additional, citations, verification, please, help, improve, this, article, adding, citations, reliable, sources, unsourced, material, challenged, removed, find, sources, news, newspapers, books, scholar, jstor, december,. This article needs additional citations for verification Please help improve this article by adding citations to reliable sources Unsourced material may be challenged and removed Find sources Memory debugger news newspapers books scholar JSTOR December 2011 Learn how and when to remove this template message 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 Contents 1 Overview 2 Comparison to static analyzer 3 List of memory debugging tools 4 See also 5 References 6 External linksOverview editMemory 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 1 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 editSome static analysis tools can also help find memory errors Memory debuggers operate as part of an application while it s 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 2 List of memory debugging tools editThis is a list of tools useful for memory debugging A profiler can be used in conjunction with a memory debugger Name OS License Languages TechniqueAddressSanitizer Linux Mac OS Free open source LLVM C C Compile time instrumentation available in Clang and GCC and specialized libraryAllinea DDT Linux Blue Gene Proprietary commercial C C and F90 Also for parallel programs on supercomputers Runtime through dynamic linkingAQtime Windows Visual Studio Embarcadero IDEs Proprietary commercial NET C Java Silverlight JScript VBScript 3 RuntimeBcheck SolarisBoundsChecker Windows Visual Studio Proprietary commercial C Runtime intercepts or compile timeDaikon Unix Windows Mac OS X 4 Free open source 5 Java C C Perl and Eiffel 4 Runtime dynamic invariant detectionDebug new general technique general technique C Compile time overrideDeleaker Windows standalone and plugins for Visual Studio RAD Studio Qt Creator CLion Proprietary commercial C Net Delphi Runtime interceptsdmalloc Any Free open source C Compile time overrideDynamoRIO Dr Memory Android Linux Windows Free open source LGPL and BSD Any Runtime interceptsElectric Fence Unix GNU GPL C C Compile time overrideFASTMM4 Windows GNU GPL Delphi Compile time overrideIBM Rational Purify Unix Windows Proprietary commercial C Java NET RuntimeInsure Windows Visual Studio plugin Unix Proprietary commercial C C source code instrumentationIntel Inspector Windows Visual Studio Linux Proprietary commercial C C Fortran Runtimelibcwd Linux gcc Free open source C C Compile time overridelibumem Solaris Bundled with Solaris Link time overrideMemwatch Any programming library Free open source C Compile time overridemtrace Various GNU LGPL GNU C library Built in outputs accessesMTuner Various Free C C Runtime intercepts Link time override MSVC Clang and GCC Leak detectionOracle Solaris Studio formerly Sun Studio Runtime Checking Linux Solaris Proprietary freeware C C FortranOLIVER APT international MVS MVS EXA DOS VSE Proprietary software IBM Assembler Runtime intercepts Hypervisor Type 2TotalView Unix Mac OS X Proprietary commercial C C Fortran RuntimeValgrind Memcheck Linux Mac OS Android GNU GPL Any Runtime interceptsWinDbg Windows Proprietary freeware C C NET Python RuntimeSee also editProfiling computer programming List of performance analysis tools Debugger Runtime error detection Software testing Software engineering Computer programming Core dumpReferences editMichael C Daconta C Pointers and Dynamic Memory Management John Wiley amp Sons ISBN 0 471 04998 0 Andrew Koenig C Traps and Pitfalls Addison Wesley ISBN 0 201 17928 8 Review 5 memory debuggers for Linux coding 20 November 2015 Retrieved August 24 2017 Dynamic Analysis vs Static Analysis Retrieved August 24 2017 Managed Code AQtime Pro SmartBear Archived from the original on 2013 09 19 Retrieved 2013 01 14 a b The Daikon Invariant Detector User Manual The Daikon Invariant Detector User Manual External links edit Hunting Memory Bugs by Ivan Skytte Jorgensen Comparison of Free Memory Checkers by Jean Philippe Martin full citation needed Retrieved from https en wikipedia org w index php title Memory debugger amp oldid 1105889076, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.