.\" 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 .B "#include " .sp .B "void mtrace(void);" .sp .B "void muntrace(void);" .SH DESCRIPTION The function .BR mtrace () installs handlers for .BR malloc (3), .BR realloc (3) and .BR free (3). 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 "CONFORMING TO" These are GNU extensions. .SH NOTES 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 "SEE ALSO" .BR malloc (3), .BR malloc_hook (3)