1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
|
.\" Updated 28/10/1999
.de FN
\fI\|\\$1\|\fP
..
.TH LIBDEBAUCH "October 1999" "Debian GNU/Linux"
.SH NAME
debauch \- The Debauch Libary 0.1
.SH DESCRIPTION
Debauch is a malloc debugger. It is based on code from "memleak" from the
XFree86 distribution (originally by Keith Packard of the MIT X
Consortium), but has been significantly altered such that a name change
seemed appropriate. The name debauch was chosen in contrast to a
commercial memory debugger "purify".
.PP
Debauch's library replaces the C library allocator; providing malloc,
free, realloc and calloc (sorry, no valloc).
.SH VARIABLES
.PP
There are several global variables which alter the behavior of debauch.
These values can be initialized from environment variables of the same
name. The environment variables should be set to 1 or 0 to turn the
behavior on or off, respectively.
.TP
.B "DebauchWarnReferenced"
Warn about free'd memory which is still referenced.
Programs may accidentially refer to this memory later, but
in most cases this is not a problem. The debauch shell
script defaults to turning this off.
.TP
.B "DebauchWarnUnreferenced"
Warn about malloc'd memory to which there are no
references, this may become "lost" memory (a memory
leak). Since leaks will be reported at the end, the
debauch shell script defaults to turning this off.
.TP
.B "DebauchWarnMiddlePointers"
Normally, memleak ignores pointers to the middle of
freed memory. These are frequently simply random data
which happens to look like a pointer. Turning this
on will generate additional messages.
.TP
.B "DebauchCheckAlways"
When set, memleak checks the entire memory system after
each allocation or free. This is very expensive, but
may catch errors not otherwise found until too late.
.PP
Serial event tracing: These variables are more useful when running inside
a debugger, or if the source to your program has been specially modified
to use debauch. Debauch assigns a serial number to each malloc/free
event and stores it in the allocation header. You can use this serial
number to control Debauch's output.
.TP
.B "DebauchAllocBreakpoint"
At each allocation, Debauch increments a serial number
and stores it in the allocation header. By rerunning
the program, you can stop when that piece of memory
is going to be allocated. Store the serial number
in this global variable and put a debugger breakpoint inside
AddActiveBlock at the indicated line
.TP
.B "DebauchFreeBreakpoint"
Similarly for freeing memory.
.TP
.B "DebauchTime"
The current serial number. (Not settable via an
environment variable.)
.TP
.B "DebauchErrorTime"
This variable will cause debauch not to print error
messages from malloc/free events before the specified
time. You may wish to use this if your program does
extensive allocation to initialize (e.g. an X11 program),
which you're not concerned about. Within the running
program (or via the debugger) you can set
DebauchErrorTime=DebauchTime, and no events prior to the
current counter will be printed when CheckMemroy is called
or when the program exits. You may also initialize
DebauchErrorTime from an environment variable of the same
name.
.SH USER-CALLABLE ROUTINES
.PP
.TP
.B "extern int DebauchStart(void);"
Client programs may call this routine to set error
reporting to ignore memory allocated or freed before the
current time. This requires the client program to be
re-compiled. Alternately, this routine may be called from a
debugger at a suitable time. Errors occuring *before* this
routine are still recognized internally; but messages about
them are supressed.
.SH "SEE ALSO"
.BR debauch(1)
This Manpage is only for Debian GNU/Linux it is not included in
the original sourcecode. The original documenation is locateted under \fB"/usr/share/doc/debauch/"\fP.
|