OSDN Git Service

Update README
[linuxjm/LDP_man-pages.git] / release / man3 / malloc_info.3
index dcb9403..4222143 100644 (file)
 .\" Translated 2013-07-22, Akihiro MOTOKI <amotoki@gmail.com>
 .\" Updated 2013-07-31, Akihiro MOTOKI <amotoki@gmail.com>
 .\"
-.TH MALLOC_INFO 3 2013\-04\-19 GNU "Linux Programmer's Manual"
+.TH MALLOC_INFO 3 2015\-01\-22 GNU "Linux Programmer's Manual"
 .SH 名前
 malloc_info \- malloc の状態をストリームに出力する
 .SH 書式
 .nf
 \fB#include <malloc.h>\fP
 .sp
-\fBint malloc_info(int \fP\fIoptions\fP\fB, FILE *\fP\fIfp\fP\fB);\fP
+\fBint malloc_info(int \fP\fIoptions\fP\fB, FILE *\fP\fIstream\fP\fB);\fP
 .fi
 .SH 説明
-\fBmalloc_info\fP() 関数は、 呼び出し元のメモリ割り当て実装の現在の状態を表す XML 文字列を出力する。 文字列は、 ファイルストリーム
-\fIfp\fP に出力される。 出力された文字列には、 全ての割り当て領域の情報が含まれる (\fBmalloc\fP(3) 参照)。
+\fBmalloc_info\fP() 関数は、 呼び出し元のメモリー割り当て実装の現在の状態を表す XML 文字列を出力する。 文字列は、
+ファイルストリーム \fIstream\fP に出力される。 出力された文字列には、 全ての割り当て領域の情報が含まれる (\fBmalloc\fP(3) 参照)。
 
 現在の実装では、 \fIoptions\fP は 0 でなければならない。
 .SH 返り値
@@ -58,32 +58,26 @@ malloc_info \- malloc の状態をストリームに出力する
 .SH 準拠
 この関数は GNU による拡張である。
 .SH 注意
-メモリ割り当て情報は (C の構造体ではなく) XML 文字列として提供される。 これは、 この情報は時間をたつと (内部で使用している実装によって)
+メモリ割り当て情報は (C の構造体ではなく) XML 文字列として提供される。 これは、 この情報は時間をたつと (内部で使用している実装によって)
 変わる可能性があるからである。 出力される XML 文字列にはバージョンフィールドが付いている。
 
 \fBopen_memstream\fP(3) 関数を使うと、 \fBmalloc_info\fP() の出力を、
-ファイルではなくメモリ内のバッファに直接送ることができる。
+ファイルではなくメモリー内のバッファーに直接送ることができる。
 
 \fBmalloc_info\fP() 関数は、 \fBmalloc_stats\fP(3) と \fBmallinfo\fP(3) の不備を解決するために設定された。
 .SH 例
-The program below takes up to four command\-line arguments, of which the
-first three are mandatory.  The first argument specifies the number of
-threads that the program should create.  All of the threads, including the
-main thread, allocate the number of blocks of memory specified by the second
-argument.  The third argument controls the size of the blocks to be
-allocated.  The main thread creates blocks of this size, the second thread
-created by the program allocates blocks of twice this size, the third thread
-allocates blocks of three times this size, and so on.
-
-The program calls \fBmalloc_info\fP()  twice to display the memory\-allocation
-state.  The first call takes place before any threads are created or memory
-allocated.  The second call is performed after all threads have allocated
-memory.
-
-In the following example, the command\-line arguments specify the creation of
-one additional thread, and both the main thread and the additional thread
-allocate 10000 blocks of memory.  After the blocks of memory have been
-allocated, \fBmalloc_info\fP()  shows the state of two allocation arenas.
+以下のプログラムは最大で 4 つのコマンドライン引数を取り、 最初の 3 つは必須である。 最初の引数は、このプログラムが生成するスレッド数を指定する。
+メインスレッドを含む全てのスレッドが第 2 引数で指定した数のメモリーブロックの割り当てを行う。 第 3 引数は割り当てるブロックのサイズを制御する。
+メインスレッドはこのサイズのブロックを作成し、 このプログラムが生成する 2 番目のスレッドはこのサイズの 2 倍のサイズのブロックを、 3
+番目のスレッドはこのサイズの 3 倍のサイズのブロックを割り当て、 以下同様である。
+
+このプログラムは \fBmalloc_info\fP() を 2 回呼び出し、メモリー割り当て状態を表示する。
+最初の呼び出しはスレッドの生成もメモリーの割り当ても行われる前に実行される。 2
+回目の呼び出しは全てのスレッドがメモリー割り当てを行った後に実行される。
+
+以下の例では、 コマンドライン引数で、 追加でスレッドを一つ生成し、メインスレッドと追加のスレッドの両方が 10000
+個のメモリーブロックを割り当てるように指定している。 メモリーブロックの割り当て後の \fBmalloc_info\fP() では、 2
+つの割り当て領域の状態が表示されている。
 .in +4
 .nf
 
@@ -234,6 +228,6 @@ main(int argc, char *argv[])
 \fBmallinfo\fP(3), \fBmalloc\fP(3), \fBmalloc_stats\fP(3), \fBmallopt\fP(3),
 \fBopen_memstream\fP(3)
 .SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部
 である。プロジェクトの説明とバグ報告に関する情報は
 http://www.kernel.org/doc/man\-pages/ に書かれている。