The debug memory allocation or dmalloc library is a drop-in replacement for the system's native memory management routines. It provides powerful debugging facilities which are configurable at runtime. These facilities include such things as memory-leak tracking, fence-post write detection, file/line number reporting, and general logging of statistics. The library has been run successfully on a wide variety of operating systems. It also provides support for the debugging of threaded programs.