||The topic of this article may not meet Wikipedia's general notability guideline. (September 2008)|
|This article needs additional citations for verification. (September 2014)|
Detect Unintended Memory Access (or DUMA) is a memory debugger. It consists of a library which programmers can link into their code to override the C standard library and C++ memory management functions. DUMA triggers a program crash when the memory error occurs, so a debugger can be used to inspect the code that caused the error.
DUMA is intended to find several common types of programming bugs:
- Overrunning the end (or beginning) of a dynamically allocated buffer
- Using a dynamically allocated buffer after returning it to the heap
- Detecting memory leaks
- Detects mismatch of allocation/deallocation functions: f.e. allocation with malloc() but deallocation with operator delete
In above cases, DUMA causes the errant program to abort immediately via a segmentation fault. Normally, these errors would cause heap corruption, which would manifest itself only much later, usually in unrelated ways. Thus, DUMA helps programmers find the precise location of memory programming errors.
DUMA allocates at least two pages (often 8kB) for every allocated buffer. In some modes of operation, it does not deallocate freed buffers. Thus, DUMA vastly increases the memory requirements of programs being debugged. This leads to the recommendation that programmers should never leave DUMA linked against production code.