OSDN Git Service

(split) LDP_man-pages: release ioctl.2 [JM:00378]
[linuxjm/LDP_man-pages.git] / draft / man3 / mtrace.3
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 .\"
5 .\" Japanese Version Copyright (c) 2002 Akihiro MOTOKI all rights reserved.
6 .\" Translated Thu 05 Dec 2002 by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
7 .\"
8 .TH MTRACE 3 2002-07-20 "GNU" "Linux Programmer's Manual"
9 .\"O .SH NAME
10 .\"O mtrace, muntrace \- malloc debugging
11 .SH Ì¾Á°
12 mtrace, muntrace \- malloc debugging
13 .\"O .SH SYNOPSIS
14 .SH ½ñ¼°
15 .B "#include <mcheck.h>"
16 .sp
17 .B "void mtrace(void);"
18 .sp
19 .B "void muntrace(void);"
20 .\"O .SH DESCRIPTION
21 .SH ÀâÌÀ
22 .\"O The function
23 .\"O .BR mtrace ()
24 .\"O installs handlers for
25 .\"O .BR malloc (3),
26 .\"O .BR realloc (3)
27 .\"O and
28 .\"O .BR free (3).
29 .\"O The function
30 .\"O .BR muntrace ()
31 .\"O disables these handlers.
32 ´Ø¿ô
33 .BR mtrace ()
34 ¤Ï¡¢
35 .BR malloc (3),
36 .BR realloc (3),
37 .BR free (3)
38 ¤Î¥Ï¥ó¥É¥é¤òÁȤ߹þ¤à¡£
39 ´Ø¿ô
40 .BR muntrace ()
41 ¤Ï¤³¤ì¤é¤Î¥Ï¥ó¥É¥é¤ò²ò½ü¤¹¤ë¡£
42 .br
43 .\"O The environment variable
44 .\"O .B MALLOC_TRACE
45 .\"O defines a file where
46 .\"O .BR mtrace ()
47 .\"O writes its output.
48 ´Ä¶­ÊÑ¿ô
49 .B MALLOC_TRACE
50 ¤Ï
51 .BR mtrace ()
52 ¤¬½ÐÎϤò½ñ¤­½Ð¤¹¥Õ¥¡¥¤¥ë¤ò»ØÄꤹ¤ë¡£
53 .\"O This file must be writable to the user or
54 .\"O .BR mtrace ()
55 .\"O will do nothing.
56 ¥æ¡¼¥¶¤¬½ñ¤­¹þ¤ß¸¢¸Â¤ò»ý¤Ä¥Õ¥¡¥¤¥ë¤ò»ØÄꤷ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
57 ½ñ¤­¹þ¤ß¸¢¸Â¤¬¤Ê¤¤¾ì¹ç¡¢
58 .BR mtrace ()
59 ¤Ï²¿¤â¤·¤Ê¤¤¡£
60 .\"O If the file is not empty it will be truncated.
61 .\" motoki: truncate ¤Ã¤Æ¡Ö¸å¤í¤òÀڤäƤ·¤Þ¤¦¡×¤è¤¦¤Ê°ÕÌ£¤Î¤Ï¤º¤À¤±¤É
62 .\" motoki: ¼ÂºÝ¤Ë»î¤·¤Æ¤ß¤ë¤È¡¢¸µ¤Î¥Õ¥¡¥¤¥ë¤ò¾å½ñ¤­¤¹¤ë¤è¤¦¤Ç¤¹¡¦¡¦¡¦
63 ¥Õ¥¡¥¤¥ë¤¬¶õ¤Ç¤Ê¤¤¾ì¹ç¡¢¥Õ¥¡¥¤¥ë¤Î¸µ¤ÎÆâÍƤò¾å½ñ¤­¤¹¤ë¡£
64 .\"O .SH "CONFORMING TO"
65 .SH ½àµò
66 .\"O These are GNU extensions.
67 ¤³¤Î´Ø¿ô¤Ï GNU ³ÈÄ¥¤Ç¤¢¤ë¡£
68 .\"O .SH NOTES
69 .SH Ãí°Õ
70 .\"O The output of
71 .\"O .BR mtrace ()
72 .\"O will be ASCII but not in a friendly format.
73 .\"O So glibc comes with a perl-script called mtrace to make sense of it.
74 .BR mtrace ()
75 ¤Î½ÐÎϤϠASCII ·Á¼°¤À¤¬¡¢¿Í¤¬Æɤߤ䤹¤¤¥Õ¥©¡¼¥Þ¥Ã¥È¤Ç¤Ï¤Ê¤¤¡£
76 ¤½¤³¤Ç¡¢glibc ¤Ë¤Ï mtrace ½ÐÎϤòʬ¤«¤ê¤ä¤¹¤¤·Á¼°¤ËÊÑ´¹¤¹¤ë
77 perl ¥¹¥¯¥ê¥×¥È¤¬ÉÕ°¤·¤Æ¤¤¤ë¡£
78 .\"O .SH "SEE ALSO"
79 .SH ´ØÏ¢¹àÌÜ
80 .BR malloc (3),
81 .BR malloc_hook (3)