1MTRACE(3) Linux Programmer's Manual MTRACE(3)
2
3
4
6 mtrace, muntrace - malloc debugging
7
9 #include <mcheck.h>
10
11 void mtrace(void);
12
13 void muntrace(void);
14
16 The function mtrace() installs handlers for malloc(3), realloc(3) and
17 free(3). The function muntrace() disables these handlers.
18 The environment variable MALLOC_TRACE defines a file where mtrace()
19 writes its output. This file must be writable to the user or mtrace()
20 will do nothing. If the file is not empty it will be truncated.
21
23 These are GNU extensions.
24
26 The output of mtrace() will be ASCII but not in a friendly format. So
27 glibc comes with a perl-script called mtrace to make sense of it.
28
30 malloc(3), malloc_hook(3)
31
33 This page is part of release 3.22 of the Linux man-pages project. A
34 description of the project, and information about reporting bugs, can
35 be found at http://www.kernel.org/doc/man-pages/.
36
37
38
39GNU 2002-07-20 MTRACE(3)