OSDN Git Service

(split) LDP: Release pages based on the previous commit
[linuxjm/LDP_man-pages.git] / release / man3 / malloc_info.3
index 47522cb..f2d1355 100644 (file)
 .\" This file was generated with po4a. Translate the source file.
 .\"
 .\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2013  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" 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"
 .SH 名前
-malloc_info \- export malloc state to a stream
+malloc_info \- malloc の状態をストリームに出力する
 .SH 書式
 .nf
 \fB#include <malloc.h>\fP
@@ -37,52 +43,40 @@ malloc_info \- export malloc state to a stream
 \fBint malloc_info(int \fP\fIoptions\fP\fB, FILE *\fP\fIfp\fP\fB);\fP
 .fi
 .SH 説明
-The \fBmalloc_info\fP()  function exports an XML string that describes the
-current state of the memory\-allocation implementation in the caller.  The
-string is printed on the file stream \fIfp\fP.  The exported string includes
-information about all arenas (see \fBmalloc\fP(3)).
+\fBmalloc_info\fP() 関数は、 呼び出し元のメモリ割り当て実装の現在の状態を表す XML 文字列を出力する。 文字列は、 ファイルストリーム
+\fIfp\fP に出力される。 出力された文字列には、 全ての割り当て領域の情報が含まれる (\fBmalloc\fP(3) 参照)。
 
-As currently implemented, \fIoptions\fP must be zero.
+現在の実装では、 \fIoptions\fP は 0 でなければならない。
 .SH 返り値
 \fBmalloc_info\fP() は、成功すると 0 を返す。 エラーの場合、\-1 を返し、 \fIerrno\fP にエラーの原因を示す値を設定する。
 .SH エラー
 .TP 
 \fBEINVAL\fP
-\fIoptions\fP was nonzero.
+\fIoptions\fP が 0 でなかった。
 .SH バージョン
 \fBmalloc_info\fP() は glibc バージョン 2.10 で追加された。
 .SH 準拠
 この関数は GNU による拡張である。
 .SH 注意
-The memory\-allocation information is provided as an XML string (rather than
-a C structure)  because the information may change over time (according to
-changes in the underlying implementation).  The output XML string includes a
-version field.
+メモリ割り当て情報は (C の構造体ではなく) XML 文字列として提供される。 これは、 この情報は時間をたつと (内部で使用している実装によって)
+変わる可能性があるからである。 出力される XML 文字列にはバージョンフィールドが付いている。
 
-The \fBopen_memstream\fP(3)  function can be used to send the output of
-\fBmalloc_info\fP()  directly into a buffer in memory, rather than to a file.
+\fBopen_memstream\fP(3) 関数を使うと、 \fBmalloc_info\fP() の出力を、
+ファイルではなくメモリ内のバッファに直接送ることができる。
 
-The \fBmalloc_info\fP()  function is designed to address deficiencies in
-\fBmalloc_stats\fP(3)  and \fBmallinfo\fP(3).
+\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
 
@@ -233,6 +227,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.52 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部
 である。プロジェクトの説明とバグ報告に関する情報は
 http://www.kernel.org/doc/man\-pages/ に書かれている。