The dmalloc library is an useful tool to debug memory problems in
your programs, but you don't really want to compile
dmalloc-support into every binary you produce, because dmalloc
brings performance loss.
The PETI_WITH_DMALLOC macro defines a user switch '--with-dmalloc'
which can be used likes this:
If no BASE-PATH has been provided, "/usr/local" will be used as
The BASE-PATH is the place where autoconf expects to find the
include- and link library files of dmalloc, specifically in:
If dmalloc-support has been enabled, the pre-processor defines
"DEBUG_DMALLOC" and "DMALLOC_FUNC_CHECK" will added to CPPFLAGS
as well as the apropriate "-I" statement.
Use the first define in your source codes to determine whether you
have dmalloc support enabled or not. Usually something like this
# include <dmalloc.h>
You will find dmalloc at <http://www.dmalloc.com/>.