Memory debugger
|
|
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. (December 2011) |
| The embedded lists in this article may contain items that are not encyclopedic. Please help out by removing such elements and incorporating appropriate items into the main body of the article. (January 2008) |
A memory debugger is a programming tool for finding 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 |
[edit] 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) works 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.
As abnormally high memory utilization can be a contributoring 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.
[edit] 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.
- AQtime
- Bcheck
- BoundsChecker
- Daikon
- Debug_new
- dmalloc
- Duma
- Electric Fence
- IBM Rational Purify
- Insure++
- Intel Parallel Inspector
- libcwd
- libumem
- MemCheck
- Memwatch
- mpatrol
- mtrace
- IBM OLIVER (CICS interactive test/debug)
- Sun Studio Runtime Checking (RTC)
- SPlint
- TotalView
- Valgrind
- WinDBG
- Dr Memory
[edit] See also
[edit] References
- 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
[edit] External links
- "Hunting Memory Bugs" by Ivan Skytte Jørgensen
- "Comparison of Free Memory Checkers" by Jean-Philippe Martin[broken citation]