Duma (software)
Encyclopedia
Detect Unintended Memory Access (or DUMA) is a memory debugger
Memory debugger
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...

. It consists of a library which programmers can link into their code to override the C standard library
C standard library
The C Standard Library is the standard library for the programming language C, as specified in the ANSI C standard.. It was developed at the same time as the C POSIX library, which is basically a superset of it...

 and C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

 memory management
Memory management
Memory management is the act of managing computer memory. The essential requirement of memory management is to provide ways to dynamically allocate portions of memory to programs at their request, and freeing it for reuse when no longer needed. This is critical to the computer system.Several...

 functions. DUMA triggers a program crash when the memory error occurs, so a debugger
Debugger
A debugger or debugging tool is a computer program that is used to test and debug other programs . The code to be examined might alternatively be running on an instruction set simulator , a technique that allows great power in its ability to halt when specific conditions are encountered but which...

 can be used to inspect the code that caused the error.

This library is a fork of Bruce Perens' Electric Fence
Electric Fence
Electric Fence is a memory debugger written by Bruce Perens. It consists of a library which programmers can link into their code to override the C standard library memory management functions...

 library, but also runs on Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 operating systems.

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.

DUMA is free software
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

 licensed under the GNU General Public License
GNU General Public License
The GNU General Public License is the most widely used free software license, originally written by Richard Stallman for the GNU Project....

.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK