mtraceのヘルプ・マニュアル
日本語 英語
mtrace --help
man mtrace
MTRACE(3) Linux Programmer’s Manual MTRACE(3)
名前
mtrace, muntrace - malloc debugging
書式
#include
void mtrace(void);
void muntrace(void);
説明
関 数 mtrace() は、 malloc(3), realloc(3), free(3) のハンドラを組み込む
。関数 muntrace() はこれらのハンドラを解除する。
環境変数 MALLOC_TRACE は mtrace() が出力を書き出すファイルを指定する 。
ユ ーザが書き込み権限を持つファイルを指定しなければならない。書き込み権
限がない場合、 mtrace() は何もしない。ファイルが空でない場合、ファイ ル
の元の内容を上書きする。
準拠
この関数は GNU 拡張である。
注意
mtrace() の出力は ASCII 形式だが、人が読みやすいフォーマットではない。
そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク リ
プトが付属している。
関連項目
malloc(3), malloc_hook(3)
GNU 2002-07-20 MTRACE(3)
MTRACE(3) Linux Programmer’s Manual MTRACE(3)
NAME
mtrace, muntrace - malloc debugging
SYNOPSIS
#include
void mtrace(void);
void muntrace(void);
DESCRIPTION
The function mtrace() installs handlers for malloc(3), realloc(3) and
free(3). The function muntrace() disables these handlers.
The environment variable MALLOC_TRACE defines a file where mtrace()
writes its output. This file must be writable to the user or mtrace()
will do nothing. If the file is not empty it will be truncated.
CONFORMING TO
These are GNU extensions.
NOTES
The output of mtrace() will be ASCII but not in a friendly format. So
glibc comes with a perl-script called mtrace to make sense of it.
SEE ALSO
malloc(3), malloc_hook(3)
COLOPHON
This page is part of release 3.22 of the Linux man-pages project. A
description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
GNU 2002-07-20 MTRACE(3)