.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) .\" Distributed under GPL .\" the glibc-info pages are very helpful here .\" .\" Japanese Version Copyright (c) 2002 Akihiro MOTOKI all rights reserved. .\" Translated Thu 05 Dec 2002 by Akihiro MOTOKI .\" .TH MTRACE 3 2002-07-20 "GNU" "Linux Programmer's Manual" .\"O .SH NAME .\"O mtrace, muntrace \- malloc debugging .SH 名前 mtrace, muntrace \- malloc debugging .\"O .SH SYNOPSIS .SH 書式 .B "#include " .sp .B "void mtrace(void);" .sp .B "void muntrace(void);" .\"O .SH DESCRIPTION .SH 説明 .\"O The function .\"O .BR mtrace () .\"O installs handlers for .\"O .BR malloc (3), .\"O .BR realloc (3) .\"O and .\"O .BR free (3). .\"O The function .\"O .BR muntrace () .\"O disables these handlers. 関数 .BR mtrace () は、 .BR malloc (3), .BR realloc (3), .BR free (3) のハンドラを組み込む。 関数 .BR muntrace () はこれらのハンドラを解除する。 .br .\"O The environment variable .\"O .B MALLOC_TRACE .\"O defines a file where .\"O .BR mtrace () .\"O writes its output. 環境変数 .B MALLOC_TRACE は .BR mtrace () が出力を書き出すファイルを指定する。 .\"O This file must be writable to the user or .\"O .BR mtrace () .\"O will do nothing. ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み権限がない場合、 .BR mtrace () は何もしない。 .\"O If the file is not empty it will be truncated. .\" motoki: truncate って「後ろを切ってしまう」ような意味のはずだけど .\" motoki: 実際に試してみると、元のファイルを上書きするようです・・・ ファイルが空でない場合、ファイルの元の内容を上書きする。 .\"O .SH "CONFORMING TO" .SH 準拠 .\"O These are GNU extensions. この関数は GNU 拡張である。 .\"O .SH NOTES .SH 注意 .\"O The output of .\"O .BR mtrace () .\"O will be ASCII but not in a friendly format. .\"O So glibc comes with a perl-script called mtrace to make sense of it. .BR mtrace () の出力は ASCII 形式だが、人が読みやすいフォーマットではない。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スクリプトが付属している。 .\"O .SH "SEE ALSO" .SH 関連項目 .BR malloc (3), .BR malloc_hook (3)