]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/mtrace.3
Add section numbers to page xrefs
[thirdparty/man-pages.git] / man3 / mtrace.3
CommitLineData
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
6mtrace, 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
15The function
16.BR mtrace ()
17installs handlers for
31e9a9ec
MK
18.BR malloc (),
19.BR realloc ()
fea681da 20and
31e9a9ec 21.BR free ().
fea681da
MK
22The function
23.BR muntrace ()
24disables these handlers.
25.br
c13182ef 26The environment variable
fea681da
MK
27.B MALLOC_TRACE
28defines a file where
29.BR mtrace ()
c13182ef 30writes its output.
fea681da
MK
31This file must be writable to the user or
32.BR mtrace ()
33will do nothing.
34If the file is not empty it will be truncated.
35.SH NOTE
36The output of
37.BR mtrace ()
c13182ef
MK
38will be ASCII but not in a friendly format.
39So glibc comes with a perl-script called mtrace to make sense of it.
a7fadb55 40.SH "CONFORMING TO"
fea681da
MK
41These are GNU extensions.
42.SH "SEE ALSO"
43.BR malloc (3),
44.BR malloc_hook (3)