summaryrefslogtreecommitdiffstats
path: root/man3/mtrace.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/mtrace.3')
-rw-r--r--man3/mtrace.331
1 files changed, 16 insertions, 15 deletions
diff --git a/man3/mtrace.3 b/man3/mtrace.3
index 31db0793a..4f69346d8 100644
--- a/man3/mtrace.3
+++ b/man3/mtrace.3
@@ -20,10 +20,11 @@ Standard C library
The
.BR mtrace ()
function installs hook functions for the memory-allocation functions
-.RB ( malloc (3),
-.BR realloc (3)
-.BR memalign (3),
-.BR free (3)).
+\%(\c
+.MR malloc 3 ,
+.MR realloc 3
+.MR memalign 3 ,
+.MR free 3 ).
These hook functions record tracing information about memory allocation
and deallocation.
The tracing information can be used to discover memory leaks and
@@ -62,7 +63,7 @@ is ignored, and
has no effect.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
-.BR attributes (7).
+.MR attributes 7 .
.TS
allbox;
lbx lb lb
@@ -97,7 +98,7 @@ The tracing output produced after a call to
.BR mtrace ()
is textual, but not designed to be human readable.
The GNU C library provides a Perl script,
-.BR mtrace (1),
+.MR mtrace 1 ,
that interprets the trace log and produces human-readable output.
For best results,
the traced program should be compiled with debugging enabled,
@@ -110,7 +111,7 @@ incurs a performance penalty (if
points to a valid, writable pathname).
.SH BUGS
The line-number information produced by
-.BR mtrace (1)
+.MR mtrace 1
is not always precise:
the line number references may refer to the previous or following (nonblank)
line of the source code.
@@ -118,7 +119,7 @@ line of the source code.
The shell session below demonstrates the use of the
.BR mtrace ()
function and the
-.BR mtrace (1)
+.MR mtrace 1
command in a program that has memory leaks at two different locations.
The demonstration uses the following program:
.P
@@ -165,16 +166,16 @@ Memory not freed:
.in
.P
The first two messages about unfreed memory correspond to the two
-.BR malloc (3)
+.MR malloc 3
calls inside the
.I for
loop.
The final message corresponds to the call to
-.BR calloc (3)
+.MR calloc 3
(which in turn calls
-.BR malloc (3)).
+.MR malloc 3 ).
.SH SEE ALSO
-.BR mtrace (1),
-.BR malloc (3),
-.BR malloc_hook (3),
-.BR mcheck (3)
+.MR mtrace 1 ,
+.MR malloc 3 ,
+.MR malloc_hook 3 ,
+.MR mcheck 3