]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) |
2 | .\" Distributed under GPL | |
3 | .\" the glibc-info pages are very helpful here | |
4 | .TH MTRACE 3 2002-07-20 "GNU" "Linux Programmer's Manual" | |
5 | .SH NAME | |
6 | mtrace, muntrace \- malloc debugging | |
7 | .SH SYNOPSIS | |
8 | .sp | |
9 | .B "#include <mcheck.h>" | |
10 | .sp | |
11 | .B "void mtrace(void);" | |
12 | .sp | |
13 | .B "void muntrace(void);" | |
14 | .SH DESCRIPTION | |
15 | The function | |
16 | .BR mtrace () | |
17 | installs handlers for | |
31e9a9ec MK |
18 | .BR malloc (), |
19 | .BR realloc () | |
fea681da | 20 | and |
31e9a9ec | 21 | .BR free (). |
fea681da MK |
22 | The function |
23 | .BR muntrace () | |
24 | disables these handlers. | |
25 | .br | |
c13182ef | 26 | The environment variable |
fea681da MK |
27 | .B MALLOC_TRACE |
28 | defines a file where | |
29 | .BR mtrace () | |
c13182ef | 30 | writes its output. |
fea681da MK |
31 | This file must be writable to the user or |
32 | .BR mtrace () | |
33 | will do nothing. | |
34 | If the file is not empty it will be truncated. | |
35 | .SH NOTE | |
36 | The output of | |
37 | .BR mtrace () | |
c13182ef MK |
38 | will be ASCII but not in a friendly format. |
39 | So glibc comes with a perl-script called mtrace to make sense of it. | |
a7fadb55 | 40 | .SH "CONFORMING TO" |
fea681da MK |
41 | These are GNU extensions. |
42 | .SH "SEE ALSO" | |
43 | .BR malloc (3), | |
44 | .BR malloc_hook (3) |