diff options
Diffstat (limited to 'man3/mtrace.3')
-rw-r--r-- | man3/mtrace.3 | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/man3/mtrace.3 b/man3/mtrace.3 new file mode 100644 index 000000000..ab9e23bf1 --- /dev/null +++ b/man3/mtrace.3 @@ -0,0 +1,44 @@ +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" Distributed under GPL +.\" the glibc-info pages are very helpful here +.TH MTRACE 3 2002-07-20 "GNU" "Linux Programmer's Manual" +.SH NAME +mtrace, muntrace \- malloc debugging +.SH SYNOPSIS +.sp +.B "#include <mcheck.h>" +.sp +.B "void mtrace(void);" +.sp +.B "void muntrace(void);" +.SH DESCRIPTION +The function +.BR mtrace () +installs handlers for +.IR malloc (), +.IR realloc () +and +.IR free (). +The function +.BR muntrace () +disables these handlers. +.br +The environment variable +.B MALLOC_TRACE +defines a file where +.BR mtrace () +writes its output. +This file must be writable to the user or +.BR mtrace () +will do nothing. +If the file is not empty it will be truncated. +.SH NOTE +The output of +.BR mtrace () +will be ASCII but not in a friendly format. +So glibc comes with a perl-script called mtrace to make sense of it. +.SH "CONFORMS TO" +These are GNU extensions. +.SH "SEE ALSO" +.BR malloc (3), +.BR malloc_hook (3) |