Debug Allocators

From Cppwiki

Jump to: navigation, search


Debug allocators are replacements for the standard memory management functions (malloc/free, operator new/operator delete etc) that track memory allocation and release operations and then inform the programmer of memory leaks..

The Microsoft Visual C++ debug runtime library has this feature built in.

The Electricfence library can be used to provide this feature in many cases where the native libc/libstdc++ does not already have it.

Using such libraries in C++ with new allocation requires compiler support for the non-standard feature of being able to #define a keyword to expand differently.