OSDN Git Service

(split) LDP: Translate several pages
[linuxjm/LDP_man-pages.git] / draft / man3 / malloc_info.3
index 23259f3..f2d1355 100644 (file)
@@ -66,24 +66,17 @@ malloc_info \- malloc の状態をストリームに出力する
 
 \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