OSDN Git Service

Complete several pages
authorAkihiro MOTOKI <amotoki@gmail.com>
Fri, 30 Jan 2015 15:20:11 +0000 (00:20 +0900)
committerAkihiro MOTOKI <amotoki@gmail.com>
Fri, 30 Jan 2015 15:20:11 +0000 (00:20 +0900)
sprof.1
delete_module.2
init_module.2
getauxval.3
mallinfo.3

20 files changed:
draft/man1/sprof.1 [new file with mode: 0644]
draft/man2/delete_module.2 [new file with mode: 0644]
draft/man2/init_module.2 [new file with mode: 0644]
draft/man3/getauxval.3 [new file with mode: 0644]
draft/man3/mallinfo.3 [new file with mode: 0644]
po4a/ld/po/ja.po
po4a/linux_module/po/ja.po
po4a/memory/po/ja.po
po4a/stdlib/po/ja.po
release/man1/sprof.1 [new file with mode: 0644]
release/man2/delete_module.2
release/man2/init_module.2
release/man3/getauxval.3 [new file with mode: 0644]
release/man3/mallinfo.3 [new file with mode: 0644]
stats/ld
stats/linux_module
stats/memory
stats/stdlib
translation_list
untrans.html

diff --git a/draft/man1/sprof.1 b/draft/man1/sprof.1
new file mode 100644 (file)
index 0000000..80b042c
--- /dev/null
@@ -0,0 +1,264 @@
+.\" Copyright (C) 2014 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH SPROF 1 2014\-06\-24 Linux "Linux User Manual"
+.SH 名前
+sprof \- 共有オブジェクトのプロファイルデータを読み出して表示する
+.SH 書式
+.nf
+\fBsprof\fP [\fIoption\fP]... \fIshared\-object\-path\fP [\fIprofile\-data\-path\fP]
+.fi
+.SH 説明
+\fBsprof\fP コマンドは、 最初のコマンドライン引き数で指定された共有オブジェクトのプロファイルの概要を表示する。 2 番目のコマンドライン引き数
+(省略可能) で指定された生成済みのプロファイルデータを使って、 プロファイルの概要が生成される。 プロファイルデータのパス名が省略された場合、
+\fBsprof\fP は、 共有オブジェクトの soname を使ってパス名を元に、 カレントディレクトリに
+\fI<soname>.profile\fP という名前のファイルを探して、 プロファイルデータを特定しようとする。
+.SH オプション
+以下のコマンドラインオプションは生成されるプロファイリング出力を指定する。
+.TP 
+\fB\-c\fP, \fB\-\-call\-pairs\fP
+共有オブジェクトで公開されているインターフェースに対して呼び出し経路のペアのリストを表示する。 各経路が使用された回数も表示される。
+.TP 
+\fB\-p\fP, \fB\-\-flat\-profile\fP
+監視対象のオブジェクトの全関数の、 回数と tick が入った flat profile を生成する。
+.TP 
+\fB\-q\fP, \fB\-\-graph\fP
+コールグラフを生成する。
+.PP
+上記のオプションがどれも指定されなかった場合のデフォルトの動作は、 flat profile とコールグラフが表示される。
+.PP
+以下のコマンドラインオプションも使用できる。
+.TP 
+\fB\-?\fP, \fB\-\-help\fP
+コマンドラインオプションと引き数の概要を表示し終了する。
+.TP 
+\fB\-\-usage\fP
+使用方法の簡潔な概要を表示し終了する。
+.TP 
+\fB\-V\fP, \fB\-\-version\fP
+プログラムのバージョンを表示し終了する。
+.SH 準拠
+\fBsprof\fP コマンドは GNU 拡張であり、 POSIX.1 には存在しない。
+.SH 例
+以下は \fBsprof\fP の使用例を示したものである。 この例では、メインプログラムで共有ライブラリ内の 2 つの関数を呼び出している。 最初に、
+メインプログラムのコードは以下の通りである。
+
+.in +4n
+.nf
+$ \fBcat prog.c\fP
+#include <stdlib.h>
+
+void x1(void);
+void x2(void);
+
+int
+main(int argc, char *argv[])
+{
+    x1();
+    x2();
+    exit(EXIT_SUCCESS);
+}
+.fi
+.in
+.PP
+関数 \fIx1()\fP と \fIx2()\fP は以下のソースファイルで定義されており、 このファイルから共有ライブラリが構成される。
+
+.in +4n
+.nf
+$ \fBcat libdemo.c\fP
+#include <unistd.h>
+
+void
+consumeCpu1(int lim)
+{
+    int j;
+
+    for (j = 0; j < lim; j++)
+       getppid();
+}
+
+void
+x1(void) {
+    int j;
+
+    for (j = 0; j < 100; j++)
+       consumeCpu1(200000);
+}
+
+void
+consumeCpu2(int lim)
+{
+    int j;
+
+    for (j = 0; j < lim; j++)
+       getppid();
+}
+
+void
+x2(void)
+{
+    int j;
+
+    for (j = 0; j < 1000; j++)
+       consumeCpu2(10000);
+}
+.fi
+.in
+.PP
+ここで、 実際の名前は \fIlibdemo.so.1.0.1\fP で soname は \fIlibdemo.so.1\fP で共有ライブラリを構成する。
+
+.in +4n
+.nf
+$ \fBcc \-g \-fPIC \-shared \-Wl,\-soname,libdemo.so.1 \e\fP
+        \fB\-o libdemo.so.1.0.1 libdemo.c\fP
+.fi
+.in
+.PP
+次に、 ライブラリ soname とライブラリのリンカー名へのシンボリックリンクを作成する。
+
+.in +4n
+.nf
+$ \fBln \-sf libdemo.so.1.0.1 libdemo.so.1\fP
+$ \fBln \-sf libdemo.so.1 libdemo.so\fP
+.fi
+.in
+.PP
+続けて、 共有ライブラリとリンクしてメインプログラムをコンパイルし、 プログラムが依存する共有ライブラリの一覧を表示する。
+
+.in +4n
+.nf
+$ \fBcc \-g \-o prog prog.c \-L. \-ldemo\fP
+$ \fBldd prog\fP
+       linux\-vdso.so.1 =>  (0x00007fff86d66000)
+       libdemo.so.1 => not found
+       libc.so.6 => /lib64/libc.so.6 (0x00007fd4dc138000)
+       /lib64/ld\-linux\-x86\-64.so.2 (0x00007fd4dc51f000)
+.fi
+.in
+.PP
+共有ライブラリのプロファイル情報を取得するために、 環境変数 \fBLD_PROFILE\fP にこのライブラリの soname を設定する。
+
+.in +4n
+.nf
+$ \fBexport LD_PROFILE=libdemo.so.1\fP
+.fi
+.in
+.PP
+環境変数 \fBLD_PROFILE_OUTPUT\fP にプロファイル情報を出力するディレクトリのパス名を設定し、
+このディレクトリが存在しない場合は作成する。
+
+.in +4n
+.nf
+$ \fBexport LD_PROFILE_OUTPUT=$(pwd)/prof_data\fP
+$ \fBmkdir \-p $LD_PROFILE_OUTPUT\fP
+.fi
+.in
+.PP
+\fBLD_PROFILE\fP を設定すると、 プロファイルの出力は出力ファイルがすでに存在する場合は「追記」されるので、
+既存のプロファイルデータが存在しないようにしておく。
+
+.in +4n
+.nf
+$ \fBrm \-f $LD_PROFILE_OUTPUT/$LD_PROFILE.profile\fP
+.fi
+.in
+.PP
+次にプログラムを実行し、 プロファイリング出力を生成させる。 プロファイリング出力は \fBLD_PROFILE_OUTPUT\fP
+で指定されたディレクトリにファイルが書き込まれる。
+
+.in +4n
+.nf
+$ \fBLD_LIBRARY_PATH=. ./prog\fP
+$ \fBls prof_data\fP
+libdemo.so.1.profile
+.fi
+.in
+.PP
+\fBsprof \-p\fP オプションを使って、 呼び出し回数と tick 数が含まれる flat プロファイルを生成する。
+
+.in +4n
+.nf
+$ \fBsprof \-p libdemo.so.1 $LD_PROFILE_OUTPUT/libdemo.so.1.profile\fP
+Flat profile:
+
+Each sample counts as 0.01 seconds.
+  %   cumulative   self              self     total
+ time   seconds   seconds    calls  us/call  us/call  name
+ 60.00      0.06     0.06      100   600.00           consumeCpu1
+ 40.00      0.10     0.04     1000    40.00           consumeCpu2
+  0.00      0.10     0.00        1     0.00           x1
+  0.00      0.10     0.00        1     0.00           x2
+.fi
+.in
+.PP
+\fBsprof \-q\fP オプションを使うと、 コールグラフが生成される。
+
+.in +4n
+.nf
+$ \fBsprof \-q libdemo.so.1 $LD_PROFILE_OUTPUT/libdemo.so.1.profile\fP
+
+index % time    self  children    called     name
+
+                0.00    0.00      100/100         x1 [1]
+[0]    100.0    0.00    0.00      100         consumeCpu1 [0]
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+                0.00    0.00        1/1           <UNKNOWN>
+[1]      0.0    0.00    0.00        1         x1 [1]
+                0.00    0.00      100/100         consumeCpu1 [0]
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+                0.00    0.00     1000/1000        x2 [3]
+[2]      0.0    0.00    0.00     1000         consumeCpu2 [2]
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+                0.00    0.00        1/1           <UNKNOWN>
+[3]      0.0    0.00    0.00        1         x2 [3]
+                0.00    0.00     1000/1000        consumeCpu2 [2]
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+.fi
+.in
+.PP
+上記や以下の例で、 "<UNKNOWN>" の文字列は、 識別子がプロファイルされたオブジェクトの外部にあることを表している
+(この例では "<UNKNOWN>" になっているのは \fImain()\fP 内のオブジェクトである)。
+.PP
+\fBsprof \-c\fP オプションを使うと、 呼び出しの組とその発生回数のリストが生成される。
+
+.in +4n
+.nf
+$ \fBsprof \-c libdemo.so.1 $LD_PROFILE_OUTPUT/libdemo.so.1.profile\fP
+<UNKNOWN>                  x1                                 1
+x1                         consumeCpu1                      100
+<UNKNOWN>                  x2                                 1
+x2                         consumeCpu2                     1000
+.fi
+.in
+.SH 関連項目
+\fBgprof\fP(1), \fBldd\fP(1), \fBld.so\fP(8)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.78 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/draft/man2/delete_module.2 b/draft/man2/delete_module.2
new file mode 100644 (file)
index 0000000..819745a
--- /dev/null
@@ -0,0 +1,133 @@
+.\" Copyright (C) 2012 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
+.\" Translated 2006-07-29, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH DELETE_MODULE 2 2014\-05\-10 Linux "Linux Programmer's Manual"
+.SH 名前
+delete_module \- カーネルモジュールをアンロードする
+.SH 書式
+.nf
+\fBint delete_module(const char *\fP\fIname\fP\fB, int \fP\fIflags\fP\fB);\fP
+.fi
+
+\fI注意\fP: この関数の宣言は glibc のヘッダーでは提供されていない。「注意」を参照。
+.SH 説明
+\fBdelete_module\fP() システムコールは、 \fIname\fP で特定される未使用のロード可能なモジュールのエントリーを削除しようとする。
+モジュールに \fIexit\fP 関数がある場合、 モジュールをアンロードする前にこの関数が実行される。 \fIflags\fP
+引き数は、以下で説明するようにシステムコールの動作を変更するのに使用される。 このシステムコールには特権が必要である。
+
+モジュールの削除は以下のルールにしたがって行われる。
+.IP 1. 4
+このモジュールに依存している (このモジュールで定義されているシンボルを参照している) モジュールがロードされている場合、 この呼び出しは失敗する。
+.IP 2.
+それ以外の場合で、 モジュールの参照カウント (このモジュールを現在使用しているプロセス数) が 0 であれば、 モジュールは直ちにアンロードされる。
+.IP 3.
+.\"    O_TRUNC == KMOD_REMOVE_FORCE in kmod library
+.\"    O_NONBLOCK == KMOD_REMOVE_NOWAIT in kmod library
+モジュールの参照カウントが 0 でない場合、 その動作は \fIflags\fP にセットされたビットによって決まる。 通常の使用時は (「注意」参照)、
+\fBO_NONBLOCK\fP は常に指定され、 \fBO_TRUNC\fP フラグが追加で指定されることがある。
+
+\fIflags\fP の組み合わせが持つ効果は以下のとおりである。
+.RS 4
+.TP 
+\fBflags == O_NONBLOCK\fP
+エラーの場合、 呼び出しは直ちに返る。
+.TP 
+\fBflags == (O_NONBLOCK | O_TRUNC)\fP
+参照カウントが 0 以外かどうかに関わらず、 直ちにモジュールをアンロードする。
+.TP 
+\fB(flags & O_NONBLOCK) == 0\fP
+\fIflags\fP に \fBO_NONBLOCK\fP が指定されなかった場合、 以下のステップで処理が行われる。
+.RS
+.IP * 3
+新しい参照を許可しないように、 指定されたモジュールにマークを付ける。
+.IP *
+モジュールの参照カウントが 0 でない場合、 参照カウントが 0 になるまで、 呼び出し元は割り込み不可のスリープ状態
+(\fBTASK_UNINTERRUPTIBLE\fP) に置かれる。 参照カウントが 0 になった時点で、 呼び出し元の停止が解除される。
+.IP *
+モジュールは通常通りの方法でアンロードされる。
+.RE
+.RE
+.PP
+\fBO_TRUNC\fP フラグには上記のルールに加えてもう一つの効果がある。 デフォルトでは、 モジュールに \fIinit\fP 関数があるが \fIexit\fP
+関数がない場合、 そのモジュールを削除しようとすると失敗する。 しかし、 \fBO_TRUNC\fP が指定された場合、 この要件はスキップされる。
+.PP
+\fBO_TRUNC\fP フラグの使用は危険である! カーネルが \fBCONFIG_MODULE_FORCE_UNLOAD\fP で作成されていない場合、
+このフラグは黙って無視される (通常は \fBCONFIG_MODULE_FORCE_UNLOAD\fP は有効になっている)。
+このフラグを使うとカーネルにゴミが残ることになる (TAINT_FORCED_RMMOD)。
+.SH 返り値
+成功の場合 0 が返される。エラーの場合 \-1 が返され、 \fIerrno\fP に適切な値が設定される。
+.SH エラー
+.TP 
+\fBEBUSY\fP
+モジュールは"live" ではない (モジュールがまだ初期化中か、 すでに削除のマークが付けられている)。 モジュールに \fIinit\fP 関数があるが
+\fIexit\fP 関数がなく、 \fIflags\fP に \fBO_TRUNC\fP が指定されていなかった。
+.TP 
+\fBEFAULT\fP
+\fIname\fP がプロセスがアクセスできるアドレス空間外の場所を参照している。
+.TP 
+\fBENOENT\fP
+その名前のモジュールが存在しない。
+.TP 
+\fBEPERM\fP
+呼び出し元が特権 (\fBCAP_SYS_MODULE\fP ケーパビリティ) を持っていなかった。 または、 モジュールのアンロードが無効になっている
+(\fBproc\fP(5) の \fI/proc/sys/kernel/modules_disabled\fP を参照)。
+.TP 
+\fBEWOULDBLOCK\fP
+他のモジュールがこのモジュールに依存している。または、 \fIflags\fP に \fBO_NONBLOCK\fP が指定されたが、
+このモジュールの参照カウントが 0 以外で \fIflags\fP に \fBO_TRUNC\fP が指定されていなかった。
+.SH 準拠
+\fBdelete_module\fP()  は Linux 固有である。
+.SH 注意
+\fBdelete_module\fP() システムコールは glibc ではサポートされていない。 glibc ヘッダーでは宣言は提供されていないが、
+歴史の紆余曲折を経て glibc はこのシステムコールに対する ABI を公開していない。
+したがって、このシステムコールを利用するには、自分のコードの中で手動でインターフェースを宣言すればよい。 \fBsyscall\fP(2)
+を使ってシステムコールを起動できる。
+
+\fIflags\fP に \fBO_NONBLOCK\fP が指定されていない場合に起こる可能性がある割り込み不可のスリープは望ましくないと考えられている。
+なぜなら、 スリープしているプロセスは kill できない状態 (unkillable state) のままになるからである。 Linux 3.7
+時点では、 \fBO_NONBLOCK\fP の指定は省略可能だが、 将来のカーネルでは必須になるだろう。
+.SS "Linux 2.4 以前"
+Linux 2.4 以前では、 このシステムコールの引き数は 1 つだけであった。
+
+\fB int delete_module(const char *\fP\fIname\fP\fB);\fP
+
+\fIname\fP が NULL の場合、 auto\-clean のマークがついたすべての未使用のモジュールが削除される。
+
+Linux 2.4 以前の \fBdelete_module\fP() の動作のより詳細な違いは、 現在のところこのマニュアルページでは説明\fIしない\fP。
+.SH 関連項目
+\fBcreate_module\fP(2), \fBinit_module\fP(2), \fBquery_module\fP(2), \fBlsmod\fP(8),
+\fBmodprobe\fP(8), \fBrmmod\fP(8)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.78 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/draft/man2/init_module.2 b/draft/man2/init_module.2
new file mode 100644 (file)
index 0000000..c975d67
--- /dev/null
@@ -0,0 +1,231 @@
+.\" Copyright (C) 2012 Michael Kerrisk <mtk.manpages@gmail.com>
+.\" A few fragments remain from a version
+.\" Copyright (C) 1996 Free Software Foundation, Inc.
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
+.\" Translated 2006-07-29, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH INIT_MODULE 2 2014\-05\-10 Linux "Linux Programmer's Manual"
+.SH 名前
+init_module, finit_module \- カーネルモジュールをロードする
+.SH 書式
+.nf
+\fBint init_module(void *\fP\fImodule_image\fP\fB, unsigned long \fP\fIlen\fP\fB,\fP
+\fB                const char *\fP\fIparam_values\fP\fB);\fP
+
+\fBint finit_module(int \fP\fIfd\fP\fB, const char *\fP\fIparam_values\fP\fB,\fP
+\fB                 int \fP\fIflags\fP\fB);\fP
+.fi
+
+\fI注意\fP: glibc では、 ヘッダーファイルでの \fBinit_module\fP() の宣言はなく、 \fBfinit_module\fP()
+のラッパー関数も提供されていない。 「注意」の節を参照。
+.SH 説明
+\fBinit_module\fP() は ELF イメージをカーネル空間にロードし、 必要なシンボルの配置変更を行い、
+モジュールパラメーターを呼び出し元から指定された値に初期化し、 最後にそのモジュールの \fIinit\fP 関数を実行する。
+このシステムコールには特権が必要である。
+
+\fImodule_image\fP 引き数はロードするバイナリーイメージが入ったバッファーを指し、 \fIlen\fP はバッファーのサイズを指定する。
+モジュールイメージは、 実行中のカーネル用に作成された有効な ELF イメージである必要がある。
+
+\fIparam_values\fP 引き数はモジュールパラメーター値を指定するスペース区切りの文字列である (モジュールパラメーターは
+\fBmodule_param\fP() や \fBmodule_param_array\fP() を使ってモジュール内で定義される)。
+カーネルはこの文字列を解釈し、指定されたパラメーターを初期化する。 各パラメーター指定は以下の形式である。
+
+\fIname\fP[\fB=\fP\fIvalue\fP[\fB,\fP\fIvalue\fP...]]
+
+パラメーター \fIname\fP はモジュール内で \fImodule_param\fP() を使って定義されているパラメーターのいずれか一つである (Linux
+カーネルのソースファイル \fIinclude/linux/moduleparam.h\fP を参照)。 パラメーター \fIvalue\fP は \fIbool\fP
+か \fIinvbool\fP パラメーターの場合は省略可能である。 配列パラメーターの値はカンマ区切りのリストで指定される。
+.SS finit_module()
+.\" commit 34e1169d996ab148490c01b65b4ee371cf8ffba2
+.\" https://lwn.net/Articles/519010/
+\fBfinit_module\fP() システムコールは \fBinit_module\fP() と同様だが、 ファイルディスクリプター \fIfd\fP
+からモジュールをロードする。 カーネルモジュールの信頼性をファイルシステムにおける場所から判定できる場合、この方法は有効である。
+この方法が利用できる場合、 モジュールの信頼性を判定するのに暗号で署名されたモジュールを使用することによるオーバーヘッドを避ける事ができる。
+\fIparam_values\fP 引き数は \fBinit_module\fP() と同じである。
+
+.\" commit 2f3238aebedb243804f58d62d57244edec4149b2
+\fIflags\fP 引き数で \fBfinit_module\fP() の動作を変更できる。 \fIflags\fP は以下のフラグの 0
+個以上の論理和をとって作成したビットマスクである。
+.TP 
+\fBMODULE_INIT_IGNORE_MODVERSIONS\fP
+シンボルのバージョンハッシュを無視する。
+.TP 
+\fBMODULE_INIT_IGNORE_VERMAGIC\fP
+カーネルのバージョン magic を無視する。
+.PP
+.\" http://www.tldp.org/HOWTO/Module-HOWTO/basekerncompat.html
+.\" is dated, but informative
+そのモジュールがロードされるカーネルに合致することを保証するためのモジュールに組み込みの安全チェックがある。 これらのチェックは、
+モジュールの作成時に記録され、 モジュールのロード時に検査される。 最初に、 モジュールはカーネルのバージョン番号と主要な機能 (CPU 種別など)
+が入った "vermagic" 文字列を記録する。 次に、 モジュールが \fBCONFIG_MODVERSIONS\fP
+設定オプションを有効にして作成されている場合、 バージョンハッシュがモジュールが使用するシンボルごとに記録される。
+このハッシュはシンボルに対応する関数の引き数と返り値の型を基づいて計算される。 この場合、
+シンボルのバージョンハッシュは十分に信頼できると考えられているため、  "vermagic" 文字列内のカーネルのバージョン番号は無視される。
+
+\fBMODULE_INIT_IGNORE_VERMAGIC\fP フラグは "vermagic" 文字列を無視することを意味し、
+\fBMODULE_INIT_IGNORE_MODVERSIONS\fP フラグはシンボルのバージョンハッシュを無視することを意味する。
+カーネルが強制ロードを許可するように作成されている場合 (\fBCONFIG_MODULE_FORCE_LOAD\fP が有効になっている場合)、
+モジュールのロードは継続され、 そうでない場合は不正なモジュールに対して返るのと同じ \fBENOEXEC\fP で失敗する。
+.SH 返り値
+成功の場合、これらのシステムコールは 0 を返す。エラーの場合 \-1 が返され、 \fIerrno\fP に適切な値が設定される。
+.SH エラー
+.TP 
+\fBEBADMSG\fP (Linux 3.7 以降)
+モジュールの署名が正しい形式ではない。
+.TP 
+\fBEBUSY\fP
+このモジュールがシンボル参照を解決する際にタイムアウトが起こった。
+.TP 
+\fBEFAULT\fP
+アドレス引き数が、プロセスがアクセスできるアドレス空間外の場所を参照していた。
+.TP 
+\fBENOKEY\fP (Linux 3.7 以降)
+.\" commit 48ba2462ace6072741fd8d0058207d630ce93bf1
+.\" commit 1d0059f3a468825b5fc5405c636a2f6e02707ffa
+.\" commit 106a4ee258d14818467829bf0e12aeae14c16cd7
+モジュールの署名が無効であるか、 カーネルがこのモジュール用の鍵を持っていない。 このエラーが返されるのは、 カーネルが
+\fBCONFIG_MODULE_SIG_FORCE\fP で作成されている場合のみである。 カーネルでこのオプションが有効になっていない場合、
+無効なモジュールや署名されていないモジュールはカーネルのゴミになる。
+.TP 
+\fBENOMEM\fP
+メモリ不足。
+.TP 
+\fBEPERM\fP
+呼び出し元が特権 (\fBCAP_SYS_MODULE\fP ケーパビリティ) を持っていなかった。もしくはモジュールのロードが無効になっている
+(\fBproc\fP(5) の \fI/proc/sys/kernel/modules_disabled\fP を参照)。
+.PP
+\fBinit_module\fP() では以下のエラーも発生する場合がある。
+.TP 
+\fBEEXIST\fP
+その名前のモジュールがすでにロードされている。
+.TP 
+\fBEINVAL\fP
+.\" .TP
+.\" .BR EINVAL " (Linux 2.4 and earlier)"
+.\" Some
+.\" .I image
+.\" slot is filled in incorrectly,
+.\" .I image\->name
+.\" does not correspond to the original module name, some
+.\" .I image\->deps
+.\" entry does not correspond to a loaded module,
+.\" or some other similar inconsistency.
+\fIparam_values\fP が無効、 または \fImodule_image\fP の ELF イメージの一部分に矛盾がある。
+.TP 
+\fBENOEXEC\fP
+\fImodule_image\fP で指定されたバイナリーイメージが ELF イメージではない、 もしくは無効な ELF イメージや別のアーキテクチャー用の
+ELF イメージである。
+.PP
+\fBfinit_module\fP() では以下のエラーも発生する場合がある。
+.TP 
+\fBEBADF\fP
+\fIfd\fP が参照するファイルが読み出し用にオープンされていない。
+.TP 
+\fBEFBIG\fP
+\fIfd\fP が参照するファイルが大きすぎる。
+.TP 
+\fBEINVAL\fP
+\fIflags\fP が無効である。
+.TP 
+\fBENOEXEC\fP
+\fIfd\fP がオープンされたファイルを参照していない。
+.PP
+上記のエラーに加え、 モジュールの \fIinit\fP 関数が実行されてエラーが発生した場合には、 \fBinit_module\fP() や
+\fBfinit_module\fP() は失敗し、 \fIerrno\fP に \fIinit\fP 関数が返した値が設定される。
+.SH バージョン
+\fBfinit_module\fP() は Linux 3.8 以降で利用可能である。
+.SH 準拠
+\fBinit_module\fP() と \fBfinit_module\fP() は Linux 固有である。
+.SH 注意
+\fBinit_module\fP() システムコールは glibc ではサポートされていない。 glibc ヘッダーでは宣言は提供されていないが、
+歴史の紆余曲折を経て glibc はこのシステムコールに対する ABI を公開していない。
+したがって、このシステムコールを利用するには、自分のコードの中で手動でインターフェースを宣言すればよい。 \fBsyscall\fP(2)
+を使ってシステムコールを起動できる。
+
+glibc は \fBfinit_module\fP() に対するラッパー関数を提供していない。 \fBsyscall\fP(2) を使って呼び出すこと。
+
+現在ロードされているモジュールに関する情報は \fI/proc/modules\fP および \fI/sys/module\fP
+以下のモジュール単位のサブディレクトリ内のファイルツリーで参照できる。
+
+Linux カーネルのソースファイル \fIinclude/linux/module.h\fP には背景に関する有用な情報がある。
+.SS "Linux 2.4 以前"
+.PP
+Linux 2.4 以前では \fBinit_module\fP() システムコールはかなり違ったものであった。
+
+\fB#include <linux/module.h>\fP
+
+\fB int init_module(const char *\fP\fIname\fP\fB, struct module *\fP\fIimage\fP\fB);\fP
+
+(ユーザー空間アプリケーションは \fBquery_module\fP() を呼び出してどのバージョンの \fBinit_module\fP()
+が利用可能かを検出できる。 \fBquery_module\fP() の呼び出しは Linux 2.6 以降ではエラー \fBENOSYS\fP で失敗する。)
+
+古いバージョンのシステムコールは、 \fIimage\fP が指す再配置されたモジュールイメージをカーネル空間にロードし、 モジュールの \fIinit\fP
+関数を実行する。 呼び出し元には再配置されたイメージを提供する責任がある (Linux 2.6 以降では \fBinit_module\fP()
+システムコールが再配置自体を行う)。
+.PP
+モジュールイメージは先頭部分に module 構造体があり、その後ろに 適切なコードとデータが続く。 Linux 2.2 以降では module
+構造体は以下のように定義されている。
+.PP
+.in +4n
+.nf
+struct module {
+    unsigned long         size_of_struct;
+    struct module        *next;
+    const char           *name;
+    unsigned long         size;
+    long                  usecount;
+    unsigned long         flags;
+    unsigned int          nsyms;
+    unsigned int          ndeps;
+    struct module_symbol *syms;
+    struct module_ref    *deps;
+    struct module_ref    *refs;
+    int                 (*init)(void);
+    void                (*cleanup)(void);
+    const struct exception_table_entry *ex_table_start;
+    const struct exception_table_entry *ex_table_end;
+#ifdef __alpha__
+    unsigned long gp;
+#endif
+};
+.fi
+.in
+.PP
+\fInext\fP と \fIrefs\fP 以外の全てのポインター要素はモジュール本体内部を指し、 カーネル空間での適切な値で初期化される
+(つまり、モジュールの残りの 部分で再配置される) ことが期待される。
+.SH 関連項目
+\fBcreate_module\fP(2), \fBdelete_module\fP(2), \fBquery_module\fP(2), \fBlsmod\fP(8),
+\fBmodprobe\fP(8)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.78 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/draft/man3/getauxval.3 b/draft/man3/getauxval.3
new file mode 100644 (file)
index 0000000..2a0ed58
--- /dev/null
@@ -0,0 +1,175 @@
+.\" Copyright 2012 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" See also https://lwn.net/Articles/519085/
+.\"
+.\" FIXME glibc 2.18 added AT_HWCAP2, which needs to e documented
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH GETAUXVAL 3 2014\-08\-19 GNU "Linux Programmer's Manual"
+.SH 名前
+getauxval \- 補助ベクトルから値を取得する
+.SH 書式
+.nf
+\fB#include <sys/auxv.h>\fP
+.sp
+\fBunsigned long getauxval(unsigned long \fP\fItype\fP\fB);\fP
+.fi
+.SH 説明
+\fBgetauxval\fP() 関数は補助ベクトル (auxiliary vector) から値を取得する。 補助ベクトルは、
+プログラムが実行される際に、 カーネルの ELF バイナリーローダーがユーザー空間にある種の情報を渡すのに使われる仕組みである。
+
+補助ベクトルの各エントリーは、 このエントリーを示すタイプとそのタイプの値のペアで構成される。 引き数 \fItype\fP が指定されると、
+\fBgetauxval\fP() は対応する値を返す。
+
+それぞれの \fItype\fP に対して返される値の詳細を以下に示す。 すべてのアーキテクチャーですべて \fItype\fP 値が存在するわけではない。
+.TP 
+\fBAT_BASE\fP
+プログラムインタープリター (通常は動的ローダー) のベースアドレス。
+.TP 
+\fBAT_BASE_PLATFORM\fP
+実プラットフォームを示す文字列。 \fBAT_PLATFORM\fP と異なる値の場合がある。 (PowerPC のみ)
+.TP 
+\fBAT_CLKTCK\fP
+\fBtimes\fP(2) のカウントが行われる周波数。 この値は \fIsysconf(_SC_CLK_TCK)\fP でも取得できる。
+.TP 
+\fBAT_DCACHEBSIZE\fP
+データキャッシュのブロックサイズ。
+.TP 
+\fBAT_EGID\fP
+このスレッドの実効グループ ID。
+.TP 
+\fBAT_ENTRY\fP
+実行ファイルのエントリーアドレス。
+.TP 
+\fBAT_EUID\fP
+このスレッドの実効ユーザー ID。
+.TP 
+\fBAT_EXECFD\fP
+プログラムのファイルディスクリプター。
+.TP 
+\fBAT_EXECFN\fP
+実行プログラムに使用されたパス名。
+.TP 
+\fBAT_FLAGS\fP
+フラグ (未使用)。
+.TP 
+\fBAT_FPUCW\fP
+使用された FPU 制御ワード (SuperH アーキテクチャーのみ)。 カーネルが実行した FPU 初期化に関する情報を提供するためのものである。
+.TP 
+\fBAT_GID\fP
+このスレッドの実グループ ID。
+.TP 
+\fBAT_HWCAP\fP
+プロセッサーの詳細な機能 (capabilities) を示す複数バイトからなるビットマスクへのポインターである。
+このビットマスクの内容はハードウェア依存である (例えば、 Intel x86 アーキテクチャーに関する詳細はカーネルのソースファイル
+\fIarch/x86/include/asm/cpufeature.h\fP を参照)。 同じ情報を人が読みやすい形になっているのが
+\fI/proc/cpuinfo\fP である。
+.TP 
+\fBAT_ICACHEBSIZE\fP
+.\" .TP
+.\" .BR AT_IGNORE
+.\" .TP
+.\" .BR AT_IGNOREPPC
+.\" .TP
+.\" .BR AT_NOTELF
+命令キャッシュのブロックサイズ。
+.TP 
+\fBAT_PAGESZ\fP
+システムページサイズ (\fIsysconf(_SC_PAGESIZE)\fP が返す値と同じ)。
+.TP 
+\fBAT_PHDR\fP
+実行プログラムのプログラムヘッダーのアドレス。
+.TP 
+\fBAT_PHENT\fP
+プログラムヘッダーエントリーのサイズ。
+.TP 
+\fBAT_PHNUM\fP
+プログラムヘッダー数。
+.TP 
+\fBAT_PLATFORM\fP
+このプログラムが実行されているハードウェアプラットフォームを特定する文字列へのポインター。 動的リンカーは \fIrpath\fP
+値の解釈を行う際にこの値を使用する。
+.TP 
+\fBAT_RANDOM\fP
+ランダム値が入った 16 バイトがあるアドレス。
+.TP 
+\fBAT_SECURE\fP
+この実行ファイルを安全に扱う必要がある場合に 0 以外の値になる。 一番よくある場合としては、 0 以外の値になるのは、 そのプロセスが
+set\-user\-ID か set\-group\-ID されたプログラムを実行している場合である。 他の場合としては、 Linux Security
+Module が有効になっている場合にも 0 以外の値となる。 この値が 0 以外の場合、 動的リンカーは特定の環境変数の使用を無効化し
+(\fBld\-linux.so\fP(8) 参照)、 glibc はそのプロセスの動作を別の観点で変更する (\fBsecure_getenv\fP(3) 参照)。
+.TP 
+\fBAT_SYSINFO\fP
+vDSO のシステムコール関数へのエントリーポイント。すべてのアーキテクチャーで存在するわけではなく、 また必要というわけでもない (例えば
+x86\-64 には存在しない)。
+.TP 
+\fBAT_SYSINFO_EHDR\fP
+仮想動的共有オブジェクト (vDSO; virtual Dynamic Shared Object) が入ったページのアドレス。 vDSO は、
+特定のシステムコールの高速な実装を提供するためにカーネルが作成する共有オブジェクトである。
+.TP 
+\fBAT_UCACHEBSIZE\fP
+ユニファイド (unified) キャッシュのブロックサイズ。
+.TP 
+\fBAT_UID\fP
+このスレッドの実ユーザー ID。
+.SH 返り値
+成功すると、 \fBgetauxval\fP() は \fItype\fP に対応する値を返す。 \fItype\fP が見つからない場合には 0 を返す。
+.SH エラー
+.TP 
+\fBENOENT\fP (glibc 2.19 以降)
+.\" commit b9ab448f980e296eac21ac65f53783967cc6037b
+\fItype\fP に対応するエントリーが補助ベクトルになかった。
+.SH バージョン
+\fBgetauxval\fP() 関数は glibc バージョン 2.16 で追加された。
+.SH 属性
+.SS "マルチスレッディング (pthreads(7) 参照)"
+関数 \fBgetauxval\fP() はスレッドセーフである。
+.SH 準拠
+この関数は非標準で glibc による拡張である。
+.SH 注意
+補助ベクトルの情報を主に使用するのは、 動的ローダー \fBld\-linux.so\fP(8) である。 補助ベクトルは、
+カーネルが動的リンカーが通常もしくは常に必要とするある意味標準的な情報を伝えるための便利で効率的なショートカットである。 いくつかの場合では、
+同じ情報がシステムコール経由でも取得できるが、 補助ベクトルを使う方がコストがかからない。
+
+補助ベクトルには、 単に、 プロセスのアドレス空間の引き数リストと環境上に存在するだけである。 プログラム実行時に \fBLD_SHOW_AUXV\fP
+環境変数を設定すると、 プログラムに渡された補助ベクトルを表示することができる。
+
+    $ LD_SHOW_AUXV=1 sleep 1
+
+任意のプロセスの補助ベクトルは (ファイルのアクセス許可があれば) \fI/proc/PID/auxv\fP 経由で取得できる。 詳細は \fBproc\fP(5)
+を参照。
+.SH バグ
+glibc 2.19 で \fBENOENT\fP エラーが追加される前は、 \fItype\fP が見つからなかった場合と \fItype\fP に対応する値が 0
+だった場合を明確に区別する方法がなかった。
+.SH 関連項目
+\fBsecure_getenv\fP(3), \fBvdso\fP(7), \fBld\-linux.so\fP(8)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.78 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/draft/man3/mallinfo.3 b/draft/man3/mallinfo.3
new file mode 100644 (file)
index 0000000..0d34543
--- /dev/null
@@ -0,0 +1,240 @@
+.\" t
+.\" Copyright (c) 2012 by Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH MALLINFO 3 2012\-05\-06 Linux "Linux Programmer's Manual"
+.SH 名前
+mallinfo \- メモリー割り当て情報を取得する
+.SH 書式
+\fB#include <malloc.h>\fP
+
+\fBstruct mallinfo mallinfo(void);\fP
+.SH 説明
+\fBmallinfo\fP() 関数は、 \fBmalloc\fP(3) や一連の関数により実行されたメモリー
+割り当てに関する情報を格納した構造体のコピーを返す。
+この構造体は以下のように定義されている。
+.PP
+.in +4n
+.nf
+struct mallinfo {
+    int arena;     /* Non\-mmapped space allocated (bytes) */
+    int ordblks;   /* Number of free chunks */
+    int smblks;    /* Number of free fastbin blocks */
+    int hblks;     /* Number of mmapped regions */
+    int hblkhd;    /* Space allocated in mmapped regions (bytes) */
+    int usmblks;   /* Maximum total allocated space (bytes) */
+    int fsmblks;   /* Space in freed fastbin blocks (bytes) */
+    int uordblks;  /* Total allocated space (bytes) */
+    int fordblks;  /* Total free space (bytes) */
+    int keepcost;  /* Top\-most, releasable space (bytes) */
+};
+.fi
+.in
+.PP
+\fImallinfo\fP 構造体の各フィールドには以下の情報が格納される。
+.TP  10
+\fIarena\fP
+\fBmmap\fP(2) 以外の手段で割り当てられた総メモリー量 (例えばヒープに割り当てられたメモリー) 。
+この数字には使用中のブロックやフリーリスト上のブロックも含まれる。
+.TP 
+\fIordblks\fP
+通常の (つまり fastbin ではない) 未使用ブロック数。
+.TP 
+\fIsmblks\fP
+fastbin 未使用ブロック数 (\fBmallopt\fP(3) 参照)。
+.TP 
+\fIhblks\fP
+\fBmmap\fP(2) を使って現在割り当てられているブロック数 (\fBmallopt\fP(3) の \fBM_MMAP_THRESHOLD\fP
+の議論を参照)。
+.TP 
+\fIhblkhd\fP
+\fBmmap\fP(2) を使って現在割り当てられているブロックのバイト数。
+.TP 
+\fIusmblks\fP
+割り当てた空間の最高点 ("highwater mark")、 つまり、 これまでの中での最大の割り当て量。
+このフィールドはスレッド化されていない環境でのみ収集される。
+.TP 
+\fIfsmblks\fP
+fastbin フリーブロックの総バイト数。
+.TP 
+\fIuordblks\fP
+使用中の割り当てメモリーで使われているバイト数。
+.TP 
+\fIfordblks\fP
+フリーブロックの総バイト数。
+.TP 
+\fIkeepcost\fP
+.\" .SH VERSIONS
+.\" Available already in glibc 2.0, possibly earlier
+ヒープの一番上にある解放可能な未使用の空間の大きさ。 この値は \fBmalloc_trim\fP(3) で理想的な場合に解放できる最大のバイト数である
+(理想的というのは、 ページ境界の制限などを無視した場合である。
+.SH 準拠
+この関数は POSIX や C 標準では規定されていない。 多くの System V 由来のシステムに同様の関数が存在し、 SVID
+では同様の関数が規定されていた。
+.SH バグ
+.\" FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=208
+.\" See the 24 Aug 2011 mail by Paul Pluzhnikov:
+.\"     "[patch] Fix mallinfo() to accumulate results for all arenas"
+.\" on libc-alpha@sourceware.org
+\fBこれらの情報はメインのメモリー割り当て領域に対するもののみである。\fP 他の領域の割り当ては対象にならない。
+他の領域の情報も取得できる別の手段については \fBmalloc_stats\fP(3) や \fBmalloc_info\fP(3) を参照。
+
+\fImallinfo\fP 構造体の各フィールドは \fIint\fP 型である。 しかし、 いくつかの内部管理用の値は \fIlong\fP 型の場合もあるので、
+報告される値が一周してしまい、 不正確になる可能性がある。
+.SH 例
+以下のプログラムは \fBmallinfo\fP() を利用して、 メモリーブロックの割り当て、解放のそれぞれ前後でメモリー割り当ての統計情報を取得する。
+統計情報は標準出力に表示される。
+
+最初の 2 つのコマンドライン引き数は \fBmalloc\fP(3) で割り当てるブロック数とサイズを指定する。
+
+残りの 3 つの引き数は、どの割り当てられたブロックを \fBfree\fP(3) で解放すべきかを指定する。 これらの 3 つの引き数の指定は任意で、
+最初のものから順に以下の情報を指定する。 1 つ目の引き数は、 ブロックを解放するループで使用するステップサイズを指定する (デフォルト値は 1 で、
+1 は指定した範囲のすべてのブロックを解放することを意味する)。 2 つ目の引き数は、 解放する先頭ブロックの場所番号を指定する (デフォルト値は 0
+で、 0 は先頭の割り当て済みブロックを意味する)。 3 つ目の引き数は、 解放する最終ブロックの場所番号よりひとつ大きい値を指定する
+(デフォルト値は最大ブロック番号よりもひとつ大きい値である)。 これらの 3 つの引き数が省略された場合、
+デフォルトではすべての割り当てられたブロックが解放される。
+
+以下のプログラムの実行例では、 100 バイトの割り当てを 1000 回実行し、 割り当てたブロックの 2 つに 1 つを解放する。
+.PP
+.in +4n
+.nf
+$ \fB./a.out 1000 100 2\fP
+============== Before allocating blocks ==============
+Total non\-mmapped bytes (arena):       0
+# of free chunks (ordblks):            1
+# of free fastbin blocks (smblks):     0
+# of mapped regions (hblks):           0
+Bytes in mapped regions (hblkhd):      0
+Max. total allocated space (usmblks):  0
+Free bytes held in fastbins (fsmblks): 0
+Total allocated space (uordblks):      0
+Total free space (fordblks):           0
+Topmost releasable block (keepcost):   0
+
+============== After allocating blocks ==============
+Total non\-mmapped bytes (arena):       135168
+# of free chunks (ordblks):            1
+# of free fastbin blocks (smblks):     0
+# of mapped regions (hblks):           0
+Bytes in mapped regions (hblkhd):      0
+Max. total allocated space (usmblks):  0
+Free bytes held in fastbins (fsmblks): 0
+Total allocated space (uordblks):      104000
+Total free space (fordblks):           31168
+Topmost releasable block (keepcost):   31168
+
+============== After freeing blocks ==============
+Total non\-mmapped bytes (arena):       135168
+# of free chunks (ordblks):            501
+# of free fastbin blocks (smblks):     0
+# of mapped regions (hblks):           0
+Bytes in mapped regions (hblkhd):      0
+Max. total allocated space (usmblks):  0
+Free bytes held in fastbins (fsmblks): 0
+Total allocated space (uordblks):      52000
+Total free space (fordblks):           83168
+Topmost releasable block (keepcost):   31168
+.fi
+.in
+.SS プログラムのソース
+\&
+.nf
+#include <malloc.h>
+#include "tlpi_hdr.h"
+
+static void
+display_mallinfo(void)
+{
+    struct mallinfo mi;
+
+    mi = mallinfo();
+
+    printf("Total non\-mmapped bytes (arena):       %d\en", mi.arena);
+    printf("# of free chunks (ordblks):            %d\en", mi.ordblks);
+    printf("# of free fastbin blocks (smblks):     %d\en", mi.smblks);
+    printf("# of mapped regions (hblks):           %d\en", mi.hblks);
+    printf("Bytes in mapped regions (hblkhd):      %d\en", mi.hblkhd);
+    printf("Max. total allocated space (usmblks):  %d\en", mi.usmblks);
+    printf("Free bytes held in fastbins (fsmblks): %d\en", mi.fsmblks);
+    printf("Total allocated space (uordblks):      %d\en", mi.uordblks);
+    printf("Total free space (fordblks):           %d\en", mi.fordblks);
+    printf("Topmost releasable block (keepcost):   %d\en", mi.keepcost);
+}
+
+int
+main(int argc, char *argv[])
+{
+#define MAX_ALLOCS 2000000
+    char *alloc[MAX_ALLOCS];
+    int numBlocks, j, freeBegin, freeEnd, freeStep;
+    size_t blockSize;
+
+    if (argc < 3 || strcmp(argv[1], "\-\-help") == 0)
+        usageErr("%s num\-blocks block\-size [free\-step [start\-free "
+                "[end\-free]]]\en", argv[0]);
+
+    numBlocks = atoi(argv[1]);
+    blockSize = atoi(argv[2]);
+    freeStep = (argc > 3) ? atoi(argv[3]) : 1;
+    freeBegin = (argc > 4) ? atoi(argv[4]) : 0;
+    freeEnd = (argc > 5) ? atoi(argv[5]) : numBlocks;
+
+    printf("============== Before allocating blocks ==============\en");
+    display_mallinfo();
+
+    for (j = 0; j < numBlocks; j++) {
+        if (numBlocks >= MAX_ALLOCS)
+            fatal("Too many allocations");
+
+        alloc[j] = malloc(blockSize);
+        if (alloc[j] == NULL)
+            errExit("malloc");
+    }
+
+    printf("\en============== After allocating blocks ==============\en");
+    display_mallinfo();
+
+    for (j = freeBegin; j < freeEnd; j += freeStep)
+        free(alloc[j]);
+
+    printf("\en============== After freeing blocks ==============\en");
+    display_mallinfo();
+
+    exit(EXIT_SUCCESS);
+}
+.fi
+.SH 関連項目
+.ad l
+.nh
+\fBmmap\fP(2), \fBmalloc\fP(3), \fBmalloc_info\fP(3), \fBmalloc_stats\fP(3),
+\fBmalloc_trim\fP(3), \fBmallopt\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.78 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。
index 8a05393..a0bcf1b 100644 (file)
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "POT-Creation-Date: 2015-01-23 22:24+0900\n"
-"PO-Revision-Date: 2015-01-25 06:23+0900\n"
+"PO-Revision-Date: 2015-01-30 17:19+0900\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language: \n"
@@ -8882,7 +8882,7 @@ msgstr "2014-06-24"
 #. type: Plain text
 #: build/C/man1/sprof.1:28
 msgid "sprof - read and display shared object profiling data"
-msgstr ""
+msgstr "sprof - 共有オブジェクトのプロファイルデータを読み出して表示する"
 
 #. type: Plain text
 #: build/C/man1/sprof.1:32
@@ -8900,13 +8900,13 @@ msgid ""
 "B<sprof> will attempt to deduce it using the soname of the shared object, "
 "looking for a file with the name I<E<lt>sonameE<gt>.profile> in the current "
 "directory."
-msgstr ""
+msgstr "B<sprof> コマンドは、 最初のコマンドライン引き数で指定された共有オブジェクトのプロファイルの概要を表示する。 2 番目のコマンドライン引き数 (省略可能) で指定された生成済みのプロファイルデータを使って、 プロファイルの概要が生成される。 プロファイルデータのパス名が省略された場合、 B<sprof> は、 共有オブジェクトの soname を使ってパス名を元に、 カレントディレクトリに I<E<lt>sonameE<gt>.profile> という名前のファイルを探して、 プロファイルデータを特定しようとする。"
 
 #. type: Plain text
 #: build/C/man1/sprof.1:49
 msgid ""
 "The following command-line options specify the profile output to be produced:"
-msgstr ""
+msgstr "以下のコマンドラインオプションは生成されるプロファイリング出力を指定する。"
 
 #. type: TP
 #: build/C/man1/sprof.1:49
@@ -8919,7 +8919,7 @@ msgstr "B<-c>, B<--call-pairs>"
 msgid ""
 "Print a list of pairs of call paths for the interfaces exported by the "
 "shared object, along with the number of times each path is used."
-msgstr ""
+msgstr "共有オブジェクトで公開されているインターフェースに対して呼び出し経路のペアのリストを表示する。 各経路が使用された回数も表示される。"
 
 #. type: TP
 #: build/C/man1/sprof.1:54
@@ -8932,7 +8932,7 @@ msgstr "B<-p>, B<--flat-profile>"
 msgid ""
 "Generate a flat profile of all of the functions in the monitored object, "
 "with counts and ticks."
-msgstr ""
+msgstr "監視対象のオブジェクトの全関数の、 回数と tick が入った flat profile を生成する。"
 
 #. type: TP
 #: build/C/man1/sprof.1:58
@@ -8943,39 +8943,39 @@ msgstr "B<-q>, B<--graph>"
 #. type: Plain text
 #: build/C/man1/sprof.1:61
 msgid "Generate a call graph."
-msgstr ""
+msgstr "コールグラフを生成する。"
 
 #. type: Plain text
 #: build/C/man1/sprof.1:64
 msgid ""
 "If none of the above options is specified, then the default behavior is to "
 "display a flat profile and a call graph."
-msgstr ""
+msgstr "上記のオプションがどれも指定されなかった場合のデフォルトの動作は、 flat profile とコールグラフが表示される。"
 
 #. type: Plain text
 #: build/C/man1/sprof.1:66
 msgid "The following additional command-line options are available:"
-msgstr ""
+msgstr "以下のコマンドラインオプションも使用できる。"
 
 #. type: Plain text
 #: build/C/man1/sprof.1:69
 msgid "Display a summary of command-line options and arguments and exit."
-msgstr ""
+msgstr "コマンドラインオプションと引き数の概要を表示し終了する。"
 
 #. type: Plain text
 #: build/C/man1/sprof.1:72
 msgid "Display a short usage message and exit."
-msgstr ""
+msgstr "使用方法の簡潔な概要を表示し終了する。"
 
 #. type: Plain text
 #: build/C/man1/sprof.1:75
 msgid "Display the program version and exit."
-msgstr ""
+msgstr "プログラムのバージョンを表示し終了する。"
 
 #. type: Plain text
 #: build/C/man1/sprof.1:79
 msgid "The B<sprof> command is a GNU extension, not present in POSIX.1."
-msgstr ""
+msgstr "B<sprof> コマンドは GNU 拡張であり、 POSIX.1 には存在しない。"
 
 #. type: Plain text
 #: build/C/man1/sprof.1:85
@@ -8983,7 +8983,7 @@ msgid ""
 "The following example demonstrates the use of B<sprof>.  The example "
 "consists of a main program that calls two functions in a shared library.  "
 "First, the code of the main program:"
-msgstr ""
+msgstr "以下は B<sprof> の使用例を示したものである。 この例では、メインプログラムで共有ライブラリ内の 2 つの関数を呼び出している。 最初に、 メインプログラムのコードは以下の通りである。"
 
 #. type: Plain text
 #: build/C/man1/sprof.1:90
@@ -9030,7 +9030,7 @@ msgstr ""
 msgid ""
 "The functions I<x1()> and I<x2()> are defined in the following source file "
 "that is used to construct the shared library:"
-msgstr ""
+msgstr "関数 I<x1()> と I<x2()> は以下のソースファイルで定義されており、 このファイルから共有ライブラリが構成される。"
 
 #. type: Plain text
 #: build/C/man1/sprof.1:115
@@ -9137,7 +9137,7 @@ msgstr ""
 msgid ""
 "Now we construct the shared library with the real name I<libdemo.so.1.0.1>, "
 "and the soname I<libdemo.so.1>:"
-msgstr ""
+msgstr "ここで、 実際の名前は I<libdemo.so.1.0.1> で soname は I<libdemo.so.1> で共有ライブラリを構成する。"
 
 #. type: Plain text
 #: build/C/man1/sprof.1:162
@@ -9154,7 +9154,7 @@ msgstr ""
 msgid ""
 "Then we construct symbolic links for the library soname and the library "
 "linker name:"
-msgstr ""
+msgstr "次に、 ライブラリ soname とライブラリのリンカー名へのシンボリックリンクを作成する。"
 
 #. type: Plain text
 #: build/C/man1/sprof.1:172
@@ -9171,7 +9171,7 @@ msgstr ""
 msgid ""
 "Next, we compile the main program, linking it against the shared library, "
 "and then list the dynamic dependencies of the program:"
-msgstr ""
+msgstr "続けて、 共有ライブラリとリンクしてメインプログラムをコンパイルし、 プログラムが依存する共有ライブラリの一覧を表示する。"
 
 #. type: Plain text
 #: build/C/man1/sprof.1:186
@@ -9196,7 +9196,7 @@ msgstr ""
 msgid ""
 "In order to get profiling information for the shared library, we define the "
 "environment variable B<LD_PROFILE> with the soname of the library:"
-msgstr ""
+msgstr "共有ライブラリのプロファイル情報を取得するために、 環境変数 B<LD_PROFILE> にこのライブラリの soname を設定する。"
 
 #. type: Plain text
 #: build/C/man1/sprof.1:197
@@ -9210,7 +9210,7 @@ msgid ""
 "We then define the environment variable B<LD_PROFILE_OUTPUT> with the "
 "pathname of the directory where profile output should be written, and create "
 "that directory if it does not exist already:"
-msgstr ""
+msgstr "環境変数 B<LD_PROFILE_OUTPUT> にプロファイル情報を出力するディレクトリのパス名を設定し、 このディレクトリが存在しない場合は作成する。"
 
 #. type: Plain text
 #: build/C/man1/sprof.1:209
@@ -9228,7 +9228,7 @@ msgid ""
 "B<LD_PROFILE> causes profiling output to be I<appended> to the output file "
 "if it already exists, so we ensure that there is no preexisting profiling "
 "data:"
-msgstr ""
+msgstr "B<LD_PROFILE> を設定すると、 プロファイルの出力は出力ファイルがすでに存在する場合は「追記」されるので、 既存のプロファイルデータが存在しないようにしておく。"
 
 #. type: Plain text
 #: build/C/man1/sprof.1:221
@@ -9241,7 +9241,7 @@ msgstr "$ B<rm -f $LD_PROFILE_OUTPUT/$LD_PROFILE.profile>\n"
 msgid ""
 "We then run the program to produce the profiling output, which is written to "
 "a file in the directory specified in B<LD_PROFILE_OUTPUT>:"
-msgstr ""
+msgstr "次にプログラムを実行し、 プロファイリング出力を生成させる。 プロファイリング出力は B<LD_PROFILE_OUTPUT> で指定されたディレクトリにファイルが書き込まれる。"
 
 #. type: Plain text
 #: build/C/man1/sprof.1:233
@@ -9260,7 +9260,7 @@ msgstr ""
 msgid ""
 "We then use the B<sprof -p> option to generate a flat profile with counts "
 "and ticks:"
-msgstr ""
+msgstr "B<sprof -p> オプションを使って、 呼び出し回数と tick 数が含まれる flat プロファイルを生成する。"
 
 #. type: Plain text
 #: build/C/man1/sprof.1:244
@@ -9295,7 +9295,7 @@ msgstr ""
 #. type: Plain text
 #: build/C/man1/sprof.1:258
 msgid "The B<sprof -q> option generates a call graph:"
-msgstr ""
+msgstr "B<sprof -q> オプションを使うと、 コールグラフが生成される。"
 
 #. type: Plain text
 #: build/C/man1/sprof.1:262
@@ -9349,14 +9349,14 @@ msgid ""
 "Above and below, the \"E<lt>UNKNOWNE<gt>\" strings represent identifiers "
 "that are outside of the profiled object (in this example, these are "
 "instances of I<main()>)."
-msgstr ""
+msgstr "上記や以下の例で、 \"E<lt>UNKNOWNE<gt>\" の文字列は、 識別子がプロファイルされたオブジェクトの外部にあることを表している (この例では \"E<lt>UNKNOWNE<gt>\" になっているのは I<main()> 内のオブジェクトである)。"
 
 #. type: Plain text
 #: build/C/man1/sprof.1:289
 msgid ""
 "The B<sprof -c> option generates a list of call pairs and the number of "
 "their occurrences:"
-msgstr ""
+msgstr "B<sprof -c> オプションを使うと、 呼び出しの組とその発生回数のリストが生成される。"
 
 #. type: Plain text
 #: build/C/man1/sprof.1:297
index d9f97ba..4099937 100644 (file)
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "POT-Creation-Date: 2015-01-23 22:24+0900\n"
-"PO-Revision-Date: 2015-01-24 20:50+0900\n"
+"PO-Revision-Date: 2015-01-31 00:03+0900\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language: \n"
@@ -334,12 +334,12 @@ msgid ""
 "then that function is executed before unloading the module.  The I<flags> "
 "argument is used to modify the behavior of the system call, as described "
 "below.  This system call requires privilege."
-msgstr ""
+msgstr "B<delete_module>() システムコールは、 I<name> で特定される未使用のロード可能なモジュールのエントリーを削除しようとする。 モジュールに I<exit> 関数がある場合、 モジュールをアンロードする前にこの関数が実行される。 I<flags> 引き数は、以下で説明するようにシステムコールの動作を変更するのに使用される。 このシステムコールには特権が必要である。"
 
 #. type: Plain text
 #: build/C/man2/delete_module.2:51
 msgid "Module removal is attempted according to the following rules:"
-msgstr ""
+msgstr "モジュールの削除は以下のルールにしたがって行われる。"
 
 #. type: IP
 #: build/C/man2/delete_module.2:51
@@ -352,7 +352,7 @@ msgstr "1."
 msgid ""
 "If there are other loaded modules that depend on (i.e., refer to symbols "
 "defined in) this module, then the call fails."
-msgstr ""
+msgstr "このモジュールに依存している (このモジュールで定義されているシンボルを参照している) モジュールがロードされている場合、 この呼び出しは失敗する。"
 
 #. type: IP
 #: build/C/man2/delete_module.2:55
@@ -366,7 +366,7 @@ msgid ""
 "Otherwise, if the reference count for the module (i.e., the number of "
 "processes currently using the module)  is zero, then the module is "
 "immediately unloaded."
-msgstr ""
+msgstr "それ以外の場合で、 モジュールの参照カウント (このモジュールを現在使用しているプロセス数) が 0 であれば、 モジュールは直ちにアンロードされる。"
 
 #. type: IP
 #: build/C/man2/delete_module.2:59
@@ -382,12 +382,12 @@ msgid ""
 "If a module has a nonzero reference count, then the behavior depends on the "
 "bits set in I<flags>.  In normal usage (see NOTES), the B<O_NONBLOCK> flag "
 "is always specified, and the B<O_TRUNC> flag may additionally be specified."
-msgstr ""
+msgstr "モジュールの参照カウントが 0 でない場合、 その動作は I<flags> にセットされたビットによって決まる。 通常の使用時は (「注意」参照)、 B<O_NONBLOCK> は常に指定され、 B<O_TRUNC> フラグが追加で指定されることがある。"
 
 #. type: Plain text
 #: build/C/man2/delete_module.2:74
 msgid "The various combinations for I<flags> have the following effect:"
-msgstr ""
+msgstr "I<flags> の組み合わせが持つ効果は以下のとおりである。"
 
 #. type: TP
 #: build/C/man2/delete_module.2:75
@@ -398,7 +398,7 @@ msgstr "B<flags == O_NONBLOCK>"
 #. type: Plain text
 #: build/C/man2/delete_module.2:78
 msgid "The call returns immediately, with an error."
-msgstr ""
+msgstr "エラーの場合、 呼び出しは直ちに返る。"
 
 #. type: TP
 #: build/C/man2/delete_module.2:78
@@ -411,7 +411,7 @@ msgstr "B<flags == (O_NONBLOCK | O_TRUNC)>"
 msgid ""
 "The module is unloaded immediately, regardless of whether it has a nonzero "
 "reference count."
-msgstr ""
+msgstr "参照カウントが 0 以外かどうかに関わらず、 直ちにモジュールをアンロードする。"
 
 #. type: TP
 #: build/C/man2/delete_module.2:82
@@ -422,7 +422,7 @@ msgstr "B<(flags & O_NONBLOCK) == 0>"
 #. type: Plain text
 #: build/C/man2/delete_module.2:89
 msgid "If I<flags> does not specify B<O_NONBLOCK>, the following steps occur:"
-msgstr ""
+msgstr "I<flags> に B<O_NONBLOCK> が指定されなかった場合、 以下のステップで処理が行われる。"
 
 #. type: IP
 #: build/C/man2/delete_module.2:90 build/C/man2/delete_module.2:92
@@ -434,7 +434,7 @@ msgstr "*"
 #. type: Plain text
 #: build/C/man2/delete_module.2:92
 msgid "The module is marked so that no new references are permitted."
-msgstr ""
+msgstr "新しい参照を許可しないように、 指定されたモジュールにマークを付ける。"
 
 #. type: Plain text
 #: build/C/man2/delete_module.2:97
@@ -442,12 +442,12 @@ msgid ""
 "If the module's reference count is nonzero, the caller is placed in an "
 "uninterruptible sleep state (B<TASK_UNINTERRUPTIBLE>)  until the reference "
 "count is zero, at which point the call unblocks."
-msgstr ""
+msgstr "モジュールの参照カウントが 0 でない場合、 参照カウントが 0 になるまで、 呼び出し元は割り込み不可のスリープ状態 (B<TASK_UNINTERRUPTIBLE>) に置かれる。 参照カウントが 0 になった時点で、 呼び出し元の停止が解除される。"
 
 #. type: Plain text
 #: build/C/man2/delete_module.2:99
 msgid "The module is unloaded in the usual way."
-msgstr ""
+msgstr "モジュールは通常通りの方法でアンロードされる。"
 
 #. type: Plain text
 #: build/C/man2/delete_module.2:113
@@ -456,7 +456,7 @@ msgid ""
 "default, if a module has an I<init> function but no I<exit> function, then "
 "an attempt to remove the module will fail.  However, if B<O_TRUNC> was "
 "specified, this requirement is bypassed."
-msgstr ""
+msgstr "B<O_TRUNC> フラグには上記のルールに加えてもう一つの効果がある。 デフォルトでは、 モジュールに I<init> 関数があるが I<exit> 関数がない場合、 そのモジュールを削除しようとすると失敗する。 しかし、 B<O_TRUNC> が指定された場合、 この要件はスキップされる。"
 
 #. type: Plain text
 #: build/C/man2/delete_module.2:124
@@ -465,7 +465,7 @@ msgid ""
 "B<CONFIG_MODULE_FORCE_UNLOAD>, this flag is silently ignored.  (Normally, "
 "B<CONFIG_MODULE_FORCE_UNLOAD> is enabled.)  Using this flag taints the "
 "kernel (TAINT_FORCED_RMMOD)."
-msgstr ""
+msgstr "B<O_TRUNC> フラグの使用は危険である! カーネルが B<CONFIG_MODULE_FORCE_UNLOAD> で作成されていない場合、 このフラグは黙って無視される (通常は B<CONFIG_MODULE_FORCE_UNLOAD> は有効になっている)。 このフラグを使うとカーネルにゴミが残ることになる (TAINT_FORCED_RMMOD)。"
 
 #. type: Plain text
 #: build/C/man2/delete_module.2:129 build/C/man2/query_module.2:134
@@ -488,7 +488,7 @@ msgid ""
 "The module is not \"live\" (i.e., it is still being initialized or is "
 "already marked for removal); or, the module has an I<init> function but has "
 "no I<exit> function, and B<O_TRUNC> was not specified in I<flags>."
-msgstr ""
+msgstr "モジュールは\"live\" ではない (モジュールがまだ初期化中か、 すでに削除のマークが付けられている)。 モジュールに I<init> 関数があるが I<exit> 関数がなく、 I<flags> に B<O_TRUNC> が指定されていなかった。"
 
 #. type: Plain text
 #: build/C/man2/delete_module.2:147
@@ -513,10 +513,7 @@ msgid ""
 "The caller was not privileged (did not have the B<CAP_SYS_MODULE> "
 "capability), or module unloading is disabled (see I</proc/sys/kernel/"
 "modules_disabled> in B<proc>(5))."
-msgstr ""
-"呼び出し元が特権 (B<CAP_SYS_MODULE> ケーパビリティ) を持っていなかった。もし"
-"くはモジュールのアンロードが無効になっている (B<proc>(5) の I</proc/sys/"
-"kernel/modules_disabled> を参照)。"
+msgstr "呼び出し元が特権 (B<CAP_SYS_MODULE> ケーパビリティ) を持っていなかった。 または、 モジュールのアンロードが無効になっている (B<proc>(5) の I</proc/sys/kernel/modules_disabled> を参照)。"
 
 #. type: TP
 #: build/C/man2/delete_module.2:161
@@ -530,7 +527,7 @@ msgid ""
 "Other modules depend on this module; or, B<O_NONBLOCK> was specified in "
 "I<flags>, but the reference count of this module is nonzero and B<O_TRUNC> "
 "was not specified in I<flags>."
-msgstr ""
+msgstr "他のモジュールがこのモジュールに依存している。または、 I<flags> に B<O_NONBLOCK> が指定されたが、 このモジュールの参照カウントが 0 以外で I<flags> に B<O_TRUNC> が指定されていなかった。"
 
 #. type: Plain text
 #: build/C/man2/delete_module.2:175
@@ -560,18 +557,18 @@ msgid ""
 "I<flags> is considered undesirable, because the sleeping process is left in "
 "an unkillable state.  As at Linux 3.7, specifying B<O_NONBLOCK> is optional, "
 "but in future kernels it is likely to become mandatory."
-msgstr ""
+msgstr "I<flags> に B<O_NONBLOCK> が指定されていない場合に起こる可能性がある割り込み不可のスリープは望ましくないと考えられている。 なぜなら、 スリープしているプロセスは kill できない状態 (unkillable state) のままになるからである。 Linux 3.7 時点では、 B<O_NONBLOCK> の指定は省略可能だが、 将来のカーネルでは必須になるだろう。"
 
 #. type: SS
 #: build/C/man2/delete_module.2:195 build/C/man2/init_module.2:288
 #, no-wrap
 msgid "Linux 2.4 and earlier"
-msgstr ""
+msgstr "Linux 2.4 以前"
 
 #. type: Plain text
 #: build/C/man2/delete_module.2:197
 msgid "In Linux 2.4 and earlier, the system call took only one argument:"
-msgstr ""
+msgstr "Linux 2.4 以前では、 このシステムコールの引き数は 1 つだけであった。"
 
 #. type: Plain text
 #: build/C/man2/delete_module.2:199
@@ -581,14 +578,14 @@ msgstr "B< int delete_module(const char *>I<name>B<);>"
 #. type: Plain text
 #: build/C/man2/delete_module.2:203
 msgid "If I<name> is NULL, all unused modules marked auto-clean are removed."
-msgstr ""
+msgstr "I<name> が NULL の場合、 auto-clean のマークがついたすべての未使用のモジュールが削除される。"
 
 #. type: Plain text
 #: build/C/man2/delete_module.2:209
 msgid ""
 "Some further details of differences in the behavior of B<delete_module>()  "
 "in Linux 2.4 and earlier are I<not> currently explained in this manual page."
-msgstr ""
+msgstr "Linux 2.4 以前の B<delete_module>() の動作のより詳細な違いは、 現在のところこのマニュアルページでは説明I<しない>。"
 
 #. type: Plain text
 #: build/C/man2/delete_module.2:216
@@ -775,7 +772,7 @@ msgstr ""
 msgid ""
 "I<Note>: glibc provides no header file declaration of B<init_module>()  and "
 "no wrapper function for B<finit_module>(); see NOTES."
-msgstr ""
+msgstr "I<注意>: glibc では、 ヘッダーファイルでの B<init_module>() の宣言はなく、 B<finit_module>() のラッパー関数も提供されていない。 「注意」の節を参照。"
 
 #. type: Plain text
 #: build/C/man2/init_module.2:54
@@ -784,7 +781,7 @@ msgid ""
 "necessary symbol relocations, initializes module parameters to values "
 "provided by the caller, and then runs the module's I<init> function.  This "
 "system call requires privilege."
-msgstr ""
+msgstr "B<init_module>() は ELF イメージをカーネル空間にロードし、 必要なシンボルの配置変更を行い、 モジュールパラメーターを呼び出し元から指定された値に初期化し、 最後にそのモジュールの I<init> 関数を実行する。 このシステムコールには特権が必要である。"
 
 #. type: Plain text
 #: build/C/man2/init_module.2:62
@@ -792,7 +789,7 @@ msgid ""
 "The I<module_image> argument points to a buffer containing the binary image "
 "to be loaded; I<len> specifies the size of that buffer.  The module image "
 "should be a valid ELF image, built for the running kernel."
-msgstr ""
+msgstr "I<module_image> 引き数はロードするバイナリーイメージが入ったバッファーを指し、 I<len> はバッファーのサイズを指定する。 モジュールイメージは、 実行中のカーネル用に作成された有効な ELF イメージである必要がある。"
 
 #. type: Plain text
 #: build/C/man2/init_module.2:73
@@ -802,12 +799,12 @@ msgid ""
 "module using B<module_param>()  and B<module_param_array>()).  The kernel "
 "parses this string and initializes the specified parameters.  Each of the "
 "parameter specifications has the form:"
-msgstr ""
+msgstr "I<param_values> 引き数はモジュールパラメーター値を指定するスペース区切りの文字列である (モジュールパラメーターは B<module_param>() や B<module_param_array>() を使ってモジュール内で定義される)。 カーネルはこの文字列を解釈し、指定されたパラメーターを初期化する。 各パラメーター指定は以下の形式である。"
 
 #. type: Plain text
 #: build/C/man2/init_module.2:78
 msgid "I<name>[B<=>I<value>[B<,>I<value>...]]"
-msgstr ""
+msgstr "I<name>[B<=>I<value>[B<,>I<value>...]]"
 
 #. type: Plain text
 #: build/C/man2/init_module.2:93
@@ -817,13 +814,13 @@ msgid ""
 "moduleparam.h>).  The parameter I<value> is optional in the case of I<bool> "
 "and I<invbool> parameters.  Values for array parameters are specified as a "
 "comma-separated list."
-msgstr ""
+msgstr "パラメーター I<name> はモジュール内で I<module_param>() を使って定義されているパラメーターのいずれか一つである (Linux カーネルのソースファイル I<include/linux/moduleparam.h> を参照)。 パラメーター I<value> は I<bool> か I<invbool> パラメーターの場合は省略可能である。 配列パラメーターの値はカンマ区切りのリストで指定される。"
 
 #. type: SS
 #: build/C/man2/init_module.2:93
 #, no-wrap
 msgid "finit_module()"
-msgstr ""
+msgstr "finit_module()"
 
 #.  commit 34e1169d996ab148490c01b65b4ee371cf8ffba2
 #.  https://lwn.net/Articles/519010/
@@ -836,7 +833,7 @@ msgid ""
 "filesystem; in cases where that is possible, the overhead of using "
 "cryptographically signed modules to determine the authenticity of a module "
 "can be avoided.  The I<param_values> argument is as for B<init_module>()."
-msgstr ""
+msgstr "B<finit_module>() システムコールは B<init_module>() と同様だが、 ファイルディスクリプター I<fd> からモジュールをロードする。 カーネルモジュールの信頼性をファイルシステムにおける場所から判定できる場合、この方法は有効である。 この方法が利用できる場合、 モジュールの信頼性を判定するのに暗号で署名されたモジュールを使用することによるオーバーヘッドを避ける事ができる。 I<param_values> 引き数は B<init_module>() と同じである。"
 
 #.  commit 2f3238aebedb243804f58d62d57244edec4149b2
 #. type: Plain text
@@ -844,29 +841,29 @@ msgstr ""
 msgid ""
 "The I<flags> argument modifies the operation of B<finit_module>().  It is a "
 "bit mask value created by ORing together zero or more of the following flags:"
-msgstr ""
+msgstr "I<flags> 引き数で B<finit_module>() の動作を変更できる。 I<flags> は以下のフラグの 0 個以上の論理和をとって作成したビットマスクである。"
 
 #. type: TP
 #: build/C/man2/init_module.2:119
 #, no-wrap
 msgid "B<MODULE_INIT_IGNORE_MODVERSIONS>"
-msgstr ""
+msgstr "B<MODULE_INIT_IGNORE_MODVERSIONS>"
 
 #. type: Plain text
 #: build/C/man2/init_module.2:122
 msgid "Ignore symbol version hashes."
-msgstr ""
+msgstr "シンボルのバージョンハッシュを無視する。"
 
 #. type: TP
 #: build/C/man2/init_module.2:122
 #, no-wrap
 msgid "B<MODULE_INIT_IGNORE_VERMAGIC>"
-msgstr ""
+msgstr "B<MODULE_INIT_IGNORE_VERMAGIC>"
 
 #. type: Plain text
 #: build/C/man2/init_module.2:125
 msgid "Ignore kernel version magic."
-msgstr ""
+msgstr "カーネルのバージョン magic を無視する。"
 
 #.  http://www.tldp.org/HOWTO/Module-HOWTO/basekerncompat.html
 #.  is dated, but informative
@@ -884,7 +881,7 @@ msgid ""
 "symbol.  In this case, the kernel version number within the \"vermagic\" "
 "string is ignored, as the symbol version hashes are assumed to be "
 "sufficiently reliable."
-msgstr ""
+msgstr "そのモジュールがロードされるカーネルに合致することを保証するためのモジュールに組み込みの安全チェックがある。 これらのチェックは、 モジュールの作成時に記録され、 モジュールのロード時に検査される。 最初に、 モジュールはカーネルのバージョン番号と主要な機能 (CPU 種別など) が入った \"vermagic\" 文字列を記録する。 次に、 モジュールが B<CONFIG_MODVERSIONS> 設定オプションを有効にして作成されている場合、 バージョンハッシュがモジュールが使用するシンボルごとに記録される。 このハッシュはシンボルに対応する関数の引き数と返り値の型を基づいて計算される。 この場合、 シンボルのバージョンハッシュは十分に信頼できると考えられているため、  \"vermagic\" 文字列内のカーネルのバージョン番号は無視される。"
 
 #. type: Plain text
 #: build/C/man2/init_module.2:154
@@ -895,7 +892,7 @@ msgid ""
 "is built to permit forced loading (i.e., configured with "
 "B<CONFIG_MODULE_FORCE_LOAD>), then loading will continue, otherwise it will "
 "fail with B<ENOEXEC> as expected for malformed modules."
-msgstr ""
+msgstr "B<MODULE_INIT_IGNORE_VERMAGIC> フラグは \"vermagic\" 文字列を無視することを意味し、 B<MODULE_INIT_IGNORE_MODVERSIONS> フラグはシンボルのバージョンハッシュを無視することを意味する。 カーネルが強制ロードを許可するように作成されている場合 (B<CONFIG_MODULE_FORCE_LOAD> が有効になっている場合)、 モジュールのロードは継続され、 そうでない場合は不正なモジュールに対して返るのと同じ B<ENOEXEC> で失敗する。"
 
 #. type: Plain text
 #: build/C/man2/init_module.2:159
@@ -915,12 +912,12 @@ msgstr "B<EBADMSG> (Linux 3.7 以降)"
 #. type: Plain text
 #: build/C/man2/init_module.2:163
 msgid "Module signature is misformatted."
-msgstr ""
+msgstr "モジュールの署名が正しい形式ではない。"
 
 #. type: Plain text
 #: build/C/man2/init_module.2:166
 msgid "Timeout while trying to resolve a symbol reference by this module."
-msgstr ""
+msgstr "このモジュールがシンボル参照を解決する際にタイムアウトが起こった。"
 
 #. type: Plain text
 #: build/C/man2/init_module.2:170
@@ -947,12 +944,12 @@ msgid ""
 "module.  This error is returned only if the kernel was configured with "
 "B<CONFIG_MODULE_SIG_FORCE>; if the kernel was not configured with this "
 "option, then an invalid or unsigned module simply taints the kernel."
-msgstr ""
+msgstr "モジュールの署名が無効であるか、 カーネルがこのモジュール用の鍵を持っていない。 このエラーが返されるのは、 カーネルが B<CONFIG_MODULE_SIG_FORCE> で作成されている場合のみである。 カーネルでこのオプションが有効になっていない場合、 無効なモジュールや署名されていないモジュールはカーネルのゴミになる。"
 
 #. type: Plain text
 #: build/C/man2/init_module.2:184
 msgid "Out of memory."
-msgstr ""
+msgstr "メモリ不足。"
 
 #. type: Plain text
 #: build/C/man2/init_module.2:195
@@ -968,7 +965,7 @@ msgstr ""
 #. type: Plain text
 #: build/C/man2/init_module.2:198
 msgid "The following errors may additionally occur for B<init_module>():"
-msgstr ""
+msgstr "B<init_module>() では以下のエラーも発生する場合がある。"
 
 #. type: Plain text
 #: build/C/man2/init_module.2:201
@@ -990,7 +987,7 @@ msgstr "その名前のモジュールがすでにロードされている。"
 msgid ""
 "I<param_values> is invalid, or some part of the ELF image in I<module_image> "
 "contains inconsistencies."
-msgstr ""
+msgstr "I<param_values> が無効、 または I<module_image> の ELF イメージの一部分に矛盾がある。"
 
 #. type: TP
 #: build/C/man2/init_module.2:217 build/C/man2/init_module.2:240
@@ -1003,12 +1000,12 @@ msgstr "B<ENOEXEC>"
 msgid ""
 "The binary image supplied in I<module_image> is not an ELF image, or is an "
 "ELF image that is invalid or for a different architecture."
-msgstr ""
+msgstr "I<module_image> で指定されたバイナリーイメージが ELF イメージではない、 もしくは無効な ELF イメージや別のアーキテクチャー用の ELF イメージである。"
 
 #. type: Plain text
 #: build/C/man2/init_module.2:226
 msgid "The following errors may additionally occur for B<finit_module>():"
-msgstr ""
+msgstr "B<finit_module>() では以下のエラーも発生する場合がある。"
 
 #. type: TP
 #: build/C/man2/init_module.2:226
@@ -1019,7 +1016,7 @@ msgstr "B<EBADF>"
 #. type: Plain text
 #: build/C/man2/init_module.2:231
 msgid "The file referred to by I<fd> is not opened for reading."
-msgstr ""
+msgstr "I<fd> が参照するファイルが読み出し用にオープンされていない。"
 
 #. type: TP
 #: build/C/man2/init_module.2:231
@@ -1030,7 +1027,7 @@ msgstr "B<EFBIG>"
 #. type: Plain text
 #: build/C/man2/init_module.2:236
 msgid "The file referred to by I<fd> is too large."
-msgstr ""
+msgstr "I<fd> が参照するファイルが大きすぎる。"
 
 #. type: Plain text
 #: build/C/man2/init_module.2:240
@@ -1048,7 +1045,7 @@ msgid ""
 "In addition to the above errors, if the module's I<init> function is "
 "executed and returns an error, then B<init_module>()  or B<finit_module>()  "
 "fails and I<errno> is set to the value returned by the I<init> function."
-msgstr ""
+msgstr "上記のエラーに加え、 モジュールの I<init> 関数が実行されてエラーが発生した場合には、 B<init_module>() や B<finit_module>() は失敗し、 I<errno> に I<init> 関数が返した値が設定される。"
 
 #. type: Plain text
 #: build/C/man2/init_module.2:259
@@ -1090,21 +1087,21 @@ msgid ""
 "Information about currently loaded modules can be found in I</proc/modules> "
 "and in the file trees under the per-module subdirectories under I</sys/"
 "module>."
-msgstr ""
+msgstr "現在ロードされているモジュールに関する情報は I</proc/modules> および I</sys/module> 以下のモジュール単位のサブディレクトリ内のファイルツリーで参照できる。"
 
 #. type: Plain text
 #: build/C/man2/init_module.2:288
 msgid ""
 "See the Linux kernel source file I<include/linux/module.h> for some useful "
 "background information."
-msgstr ""
+msgstr "Linux カーネルのソースファイル I<include/linux/module.h> には背景に関する有用な情報がある。"
 
 #. type: Plain text
 #: build/C/man2/init_module.2:293
 msgid ""
 "In Linux 2.4 and earlier, the B<init_module>()  system call was rather "
 "different:"
-msgstr ""
+msgstr "Linux 2.4 以前では B<init_module>() システムコールはかなり違ったものであった。"
 
 #. type: Plain text
 #: build/C/man2/init_module.2:295
@@ -1124,7 +1121,7 @@ msgid ""
 "(User-space applications can detect which version of B<init_module>()  is "
 "available by calling B<query_module>(); the latter call fails with the error "
 "B<ENOSYS> on Linux 2.6 and later.)"
-msgstr ""
+msgstr "(ユーザー空間アプリケーションは B<query_module>() を呼び出してどのバージョンの B<init_module>() が利用可能かを検出できる。 B<query_module>() の呼び出しは Linux 2.6 以降ではエラー B<ENOSYS> で失敗する。)"
 
 #. type: Plain text
 #: build/C/man2/init_module.2:316
@@ -1133,7 +1130,7 @@ msgid ""
 "pointed to by I<image> into kernel space and runs the module's I<init> "
 "function.  The caller is responsible for providing the relocated image "
 "(since Linux 2.6, the B<init_module>()  system call does the relocation)."
-msgstr ""
+msgstr "古いバージョンのシステムコールは、 I<image> が指す再配置されたモジュールイメージをカーネル空間にロードし、 モジュールの I<init> 関数を実行する。 呼び出し元には再配置されたイメージを提供する責任がある (Linux 2.6 以降では B<init_module>() システムコールが再配置自体を行う)。"
 
 #. type: Plain text
 #: build/C/man2/init_module.2:320
index cffc65d..b2c56fe 100644 (file)
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "POT-Creation-Date: 2015-01-23 22:24+0900\n"
-"PO-Revision-Date: 2015-01-27 03:42+0900\n"
+"PO-Revision-Date: 2015-01-28 15:24+0900\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language: \n"
@@ -2145,7 +2145,7 @@ msgid ""
 "The total amount of memory allocated by means other than B<mmap>(2)  (i.e., "
 "memory allocated on the heap).  This figure includes both in-use blocks and "
 "blocks on the free list."
-msgstr ""
+msgstr "B<mmap>(2) 以外の手段で割り当てられた総メモリー量 (例えばヒープに割り当てられたメモリー) 。 この数字には使用中のブロックやフリーリスト上のブロックも含まれる。"
 
 #. type: TP
 #: build/C/man3/mallinfo.3:68
@@ -2156,7 +2156,7 @@ msgstr "I<ordblks>"
 #. type: Plain text
 #: build/C/man3/mallinfo.3:71
 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
-msgstr ""
+msgstr "通常の (つまり fastbin ではない) 未使用ブロック数。"
 
 #. type: TP
 #: build/C/man3/mallinfo.3:71
@@ -2167,7 +2167,7 @@ msgstr "I<smblks>"
 #. type: Plain text
 #: build/C/man3/mallinfo.3:75
 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
-msgstr ""
+msgstr "fastbin 未使用ブロック数 (B<mallopt>(3) 参照)。"
 
 #. type: TP
 #: build/C/man3/mallinfo.3:75
@@ -2180,7 +2180,7 @@ msgstr "I<hblks>"
 msgid ""
 "The number of blocks currently allocated using B<mmap>(2).  (See the "
 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
-msgstr ""
+msgstr "B<mmap>(2) を使って現在割り当てられているブロック数 (B<mallopt>(3) の B<M_MMAP_THRESHOLD> の議論を参照)。"
 
 #. type: TP
 #: build/C/man3/mallinfo.3:83
@@ -2191,7 +2191,7 @@ msgstr "I<hblkhd>"
 #. type: Plain text
 #: build/C/man3/mallinfo.3:87
 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
-msgstr ""
+msgstr "B<mmap>(2) を使って現在割り当てられているブロックのバイト数。"
 
 #. type: TP
 #: build/C/man3/mallinfo.3:87
@@ -2205,7 +2205,7 @@ msgid ""
 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
 "of space that was ever allocated.  This field is maintained only in "
 "nonthreading environments."
-msgstr ""
+msgstr "割り当てた空間の最高点 (\"highwater mark\")、 つまり、 これまでの中での最大の割り当て量。 このフィールドはスレッド化されていない環境でのみ収集される。"
 
 #. type: TP
 #: build/C/man3/mallinfo.3:92
@@ -2216,7 +2216,7 @@ msgstr "I<fsmblks>"
 #. type: Plain text
 #: build/C/man3/mallinfo.3:95
 msgid "The total number of bytes in fastbin free blocks."
-msgstr ""
+msgstr "fastbin フリーブロックの総バイト数。"
 
 #. type: TP
 #: build/C/man3/mallinfo.3:95
@@ -2227,7 +2227,7 @@ msgstr "I<uordblks>"
 #. type: Plain text
 #: build/C/man3/mallinfo.3:98
 msgid "The total number of bytes used by in-use allocations."
-msgstr ""
+msgstr "使用中の割り当てメモリーで使われているバイト数。"
 
 #. type: TP
 #: build/C/man3/mallinfo.3:98
@@ -2238,7 +2238,7 @@ msgstr "I<fordblks>"
 #. type: Plain text
 #: build/C/man3/mallinfo.3:101
 msgid "The total number of bytes in free blocks."
-msgstr ""
+msgstr "フリーブロックの総バイト数。"
 
 #. type: TP
 #: build/C/man3/mallinfo.3:101
@@ -2254,14 +2254,14 @@ msgid ""
 "The total amount of releasable free space at the top of the heap.  This is "
 "the maximum number of bytes that could ideally (i.e., ignoring page "
 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
-msgstr ""
+msgstr "ヒープの一番上にある解放可能な未使用の空間の大きさ。 この値は B<malloc_trim>(3) で理想的な場合に解放できる最大のバイト数である (理想的というのは、 ページ境界の制限などを無視した場合である。"
 
 #. type: Plain text
 #: build/C/man3/mallinfo.3:114
 msgid ""
 "This function is not specified by POSIX or the C standards.  A similar "
 "function exists on many System V derivatives, and was specified in the SVID."
-msgstr ""
+msgstr "この関数は POSIX や C 標準では規定されていない。 多くの System V 由来のシステムに同様の関数が存在し、 SVID では同様の関数が規定されていた。 "
 
 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=208
 #.  See the 24 Aug 2011 mail by Paul Pluzhnikov:
@@ -2274,7 +2274,7 @@ msgid ""
 "Allocations in other arenas are excluded.  See B<malloc_stats>(3)  and "
 "B<malloc_info>(3)  for alternatives that include information about other "
 "arenas."
-msgstr ""
+msgstr "B<これらの情報はメインのメモリー割り当て領域に対するもののみである。> 他の領域の割り当ては対象にならない。 他の領域の情報も取得できる別の手段については B<malloc_stats>(3) や B<malloc_info>(3) を参照。"
 
 #. type: Plain text
 #: build/C/man3/mallinfo.3:134
@@ -2282,7 +2282,7 @@ msgid ""
 "The fields of the I<mallinfo> structure are typed as I<int>.  However, "
 "because some internal bookkeeping values may be of type I<long>, the "
 "reported values may wrap around zero and thus be inaccurate."
-msgstr ""
+msgstr "I<mallinfo> 構造体の各フィールドは I<int> 型である。 しかし、 いくつかの内部管理用の値は I<long> 型の場合もあるので、 報告される値が一周してしまい、 不正確になる可能性がある。"
 
 #. type: SH
 #: build/C/man3/mallinfo.3:134 build/C/man3/malloc_hook.3:89
@@ -2300,14 +2300,14 @@ msgid ""
 "The program below employs B<mallinfo>()  to retrieve memory allocation "
 "statistics before and after allocating and freeing some blocks of memory.  "
 "The statistics are displayed on standard output."
-msgstr ""
+msgstr "以下のプログラムは B<mallinfo>() を利用して、 メモリーブロックの割り当て、解放のそれぞれ前後でメモリー割り当ての統計情報を取得する。 統計情報は標準出力に表示される。"
 
 #. type: Plain text
 #: build/C/man3/mallinfo.3:144
 msgid ""
 "The first two command-line arguments specify the number and size of blocks "
 "to be allocated with B<malloc>(3)."
-msgstr ""
+msgstr "最初の 2 つのコマンドライン引き数は B<malloc>(3) で割り当てるブロック数とサイズを指定する。"
 
 #. type: Plain text
 #: build/C/man3/mallinfo.3:158
@@ -2321,14 +2321,14 @@ msgid ""
 "freed (default is one greater than the maximum block number).  If these "
 "three arguments are omitted, then the defaults cause all allocated blocks to "
 "be freed."
-msgstr ""
+msgstr "残りの 3 つの引き数は、どの割り当てられたブロックを B<free>(3) で解放すべきかを指定する。 これらの 3 つの引き数の指定は任意で、 最初のものから順に以下の情報を指定する。 1 つ目の引き数は、 ブロックを解放するループで使用するステップサイズを指定する (デフォルト値は 1 で、 1 は指定した範囲のすべてのブロックを解放することを意味する)。 2 つ目の引き数は、 解放する先頭ブロックの場所番号を指定する (デフォルト値は 0 で、 0 は先頭の割り当て済みブロックを意味する)。 3 つ目の引き数は、 解放する最終ブロックの場所番号よりひとつ大きい値を指定する (デフォルト値は最大ブロック番号よりもひとつ大きい値である)。 これらの 3 つの引き数が省略された場合、 デフォルトではすべての割り当てられたブロックが解放される。"
 
 #. type: Plain text
 #: build/C/man3/mallinfo.3:162
 msgid ""
 "In the following example run of the program, 1000 allocations of 100 bytes "
 "are performed, and then every second allocated block is freed:"
-msgstr ""
+msgstr "以下のプログラムの実行例では、 100 バイトの割り当てを 1000 回実行し、 割り当てたブロックの 2 つに 1 つを解放する。"
 
 #. type: Plain text
 #: build/C/man3/mallinfo.3:177
index 1790a89..5407760 100644 (file)
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "POT-Creation-Date: 2015-01-23 22:25+0900\n"
-"PO-Revision-Date: 2015-01-25 07:29+0900\n"
+"PO-Revision-Date: 2015-01-29 22:26+0900\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language: \n"
@@ -2498,7 +2498,7 @@ msgstr "GETAUXVAL"
 #. type: Plain text
 #: build/C/man3/getauxval.3:32
 msgid "getauxval - retrieve a value from the auxiliary vector"
-msgstr ""
+msgstr "getauxval - 補助ベクトルから値を取得する"
 
 #. type: Plain text
 #: build/C/man3/getauxval.3:35
@@ -2518,7 +2518,7 @@ msgid ""
 "The B<getauxval>()  function retrieves values from the auxiliary vector, a "
 "mechanism that the kernel's ELF binary loader uses to pass certain "
 "information to user space when a program is executed."
-msgstr ""
+msgstr "B<getauxval>() 関数は補助ベクトル (auxiliary vector) から値を取得する。 補助ベクトルは、 プログラムが実行される際に、 カーネルの ELF バイナリーローダーがユーザー空間にある種の情報を渡すのに使われる仕組みである。"
 
 #. type: Plain text
 #: build/C/man3/getauxval.3:53
@@ -2526,14 +2526,14 @@ msgid ""
 "Each entry in the auxiliary vector consists of a pair of values: a type that "
 "identifies what this entry represents, and a value for that type.  Given the "
 "argument I<type>, B<getauxval>()  returns the corresponding value."
-msgstr ""
+msgstr "補助ベクトルの各エントリーは、 このエントリーを示すタイプとそのタイプの値のペアで構成される。 引き数 I<type> が指定されると、 B<getauxval>() は対応する値を返す。"
 
 #. type: Plain text
 #: build/C/man3/getauxval.3:60
 msgid ""
 "The value returned for each I<type> is given in the following list.  Not all "
 "I<type> values are present on all architectures."
-msgstr ""
+msgstr "それぞれの I<type> に対して返される値の詳細を以下に示す。 すべてのアーキテクチャーですべて I<type> 値が存在するわけではない。"
 
 #. type: TP
 #: build/C/man3/getauxval.3:60
@@ -2545,7 +2545,7 @@ msgstr "B<AT_BASE>"
 #: build/C/man3/getauxval.3:63
 msgid ""
 "The base address of the program interpreter (usually, the dynamic linker)."
-msgstr ""
+msgstr "プログラムインタープリター (通常は動的ローダー) のベースアドレス。"
 
 #. type: TP
 #: build/C/man3/getauxval.3:63
@@ -2558,7 +2558,7 @@ msgstr "B<AT_BASE_PLATFORM>"
 msgid ""
 "A string identifying the real platform; may differ from B<AT_PLATFORM> "
 "(PowerPC only)."
-msgstr ""
+msgstr "実プラットフォームを示す文字列。 B<AT_PLATFORM> と異なる値の場合がある。 (PowerPC のみ)"
 
 #. type: TP
 #: build/C/man3/getauxval.3:68
@@ -2571,7 +2571,7 @@ msgstr "B<AT_CLKTCK>"
 msgid ""
 "The frequency with which B<times>(2)  counts.  This value can also be "
 "obtained via I<sysconf(_SC_CLK_TCK)>."
-msgstr ""
+msgstr "B<times>(2) のカウントが行われる周波数。 この値は I<sysconf(_SC_CLK_TCK)> でも取得できる。"
 
 #. type: TP
 #: build/C/man3/getauxval.3:75
@@ -2582,7 +2582,7 @@ msgstr "B<AT_DCACHEBSIZE>"
 #. type: Plain text
 #: build/C/man3/getauxval.3:78
 msgid "The data cache block size."
-msgstr ""
+msgstr "データキャッシュのブロックサイズ。"
 
 #. type: TP
 #: build/C/man3/getauxval.3:78
@@ -2593,7 +2593,7 @@ msgstr "B<AT_EGID>"
 #. type: Plain text
 #: build/C/man3/getauxval.3:81
 msgid "The effective group ID of the thread."
-msgstr ""
+msgstr "このスレッドの実効グループ ID。"
 
 #. type: TP
 #: build/C/man3/getauxval.3:81
@@ -2604,7 +2604,7 @@ msgstr "B<AT_ENTRY>"
 #. type: Plain text
 #: build/C/man3/getauxval.3:84
 msgid "The entry address of the executable."
-msgstr ""
+msgstr "実行ファイルのエントリーアドレス。"
 
 #. type: TP
 #: build/C/man3/getauxval.3:84
@@ -2615,7 +2615,7 @@ msgstr "B<AT_EUID>"
 #. type: Plain text
 #: build/C/man3/getauxval.3:87
 msgid "The effective user ID of the thread."
-msgstr ""
+msgstr "このスレッドの実効ユーザー ID。"
 
 #. type: TP
 #: build/C/man3/getauxval.3:87
@@ -2626,7 +2626,7 @@ msgstr "B<AT_EXECFD>"
 #. type: Plain text
 #: build/C/man3/getauxval.3:90
 msgid "File descriptor of program."
-msgstr ""
+msgstr "プログラムのファイルディスクリプター。"
 
 #. type: TP
 #: build/C/man3/getauxval.3:90
@@ -2637,7 +2637,7 @@ msgstr "B<AT_EXECFN>"
 #. type: Plain text
 #: build/C/man3/getauxval.3:93
 msgid "Pathname used to execute program."
-msgstr ""
+msgstr "実行プログラムに使用されたパス名。"
 
 #. type: TP
 #: build/C/man3/getauxval.3:93
@@ -2648,7 +2648,7 @@ msgstr "B<AT_FLAGS>"
 #. type: Plain text
 #: build/C/man3/getauxval.3:96
 msgid "Flags (unused)."
-msgstr ""
+msgstr "フラグ (未使用)。"
 
 #. type: TP
 #: build/C/man3/getauxval.3:96
@@ -2661,7 +2661,7 @@ msgstr "B<AT_FPUCW>"
 msgid ""
 "Used FPU control word (SuperH architecture only).  This gives some "
 "information about the FPU initialization performed by the kernel."
-msgstr ""
+msgstr "使用された FPU 制御ワード (SuperH アーキテクチャーのみ)。 カーネルが実行した FPU 初期化に関する情報を提供するためのものである。"
 
 #. type: TP
 #: build/C/man3/getauxval.3:101
@@ -2672,7 +2672,7 @@ msgstr "B<AT_GID>"
 #. type: Plain text
 #: build/C/man3/getauxval.3:104
 msgid "The real group ID of the thread."
-msgstr ""
+msgstr "このスレッドの実グループ ID。"
 
 #. type: TP
 #: build/C/man3/getauxval.3:104
@@ -2688,7 +2688,7 @@ msgid ""
 "(for example, see the kernel source file I<arch/x86/include/asm/cpufeature."
 "h> for details relating to the Intel x86 architecture).  A human-readable "
 "version of the same information is available via I</proc/cpuinfo>."
-msgstr ""
+msgstr "プロセッサーの詳細な機能 (capabilities) を示す複数バイトからなるビットマスクへのポインターである。 このビットマスクの内容はハードウェア依存である (例えば、 Intel x86 アーキテクチャーに関する詳細はカーネルのソースファイル I<arch/x86/include/asm/cpufeature.h> を参照)。 同じ情報を人が読みやすい形になっているのが I</proc/cpuinfo> である。"
 
 #. type: TP
 #: build/C/man3/getauxval.3:114
@@ -2705,7 +2705,7 @@ msgstr "B<AT_ICACHEBSIZE>"
 #. type: Plain text
 #: build/C/man3/getauxval.3:123
 msgid "The instruction cache block size."
-msgstr ""
+msgstr "命令キャッシュのブロックサイズ。"
 
 #. type: TP
 #: build/C/man3/getauxval.3:123
@@ -2717,7 +2717,7 @@ msgstr "B<AT_PAGESZ>"
 #: build/C/man3/getauxval.3:127
 msgid ""
 "The system page size (the same value returned by I<sysconf(_SC_PAGESIZE)>)."
-msgstr ""
+msgstr "システムページサイズ (I<sysconf(_SC_PAGESIZE)> が返す値と同じ)。"
 
 #. type: TP
 #: build/C/man3/getauxval.3:127
@@ -2728,7 +2728,7 @@ msgstr "B<AT_PHDR>"
 #. type: Plain text
 #: build/C/man3/getauxval.3:130
 msgid "The address of the program headers of the executable."
-msgstr ""
+msgstr "実行プログラムのプログラムヘッダーのアドレス。"
 
 #. type: TP
 #: build/C/man3/getauxval.3:130
@@ -2739,7 +2739,7 @@ msgstr "B<AT_PHENT>"
 #. type: Plain text
 #: build/C/man3/getauxval.3:133
 msgid "The size of program header entry."
-msgstr ""
+msgstr "プログラムヘッダーエントリーのサイズ。"
 
 #. type: TP
 #: build/C/man3/getauxval.3:133
@@ -2750,7 +2750,7 @@ msgstr "B<AT_PHNUM>"
 #. type: Plain text
 #: build/C/man3/getauxval.3:136
 msgid "The number of program headers."
-msgstr ""
+msgstr "プログラムヘッダー数。"
 
 #. type: TP
 #: build/C/man3/getauxval.3:136
@@ -2764,7 +2764,7 @@ msgid ""
 "A pointer to a string that identifies the hardware platform that the program "
 "is running on.  The dynamic linker uses this in the interpretation of "
 "I<rpath> values."
-msgstr ""
+msgstr "このプログラムが実行されているハードウェアプラットフォームを特定する文字列へのポインター。 動的リンカーは I<rpath> 値の解釈を行う際にこの値を使用する。"
 
 #. type: TP
 #: build/C/man3/getauxval.3:143
@@ -2775,7 +2775,7 @@ msgstr "B<AT_RANDOM>"
 #. type: Plain text
 #: build/C/man3/getauxval.3:146
 msgid "The address of sixteen bytes containing a random value."
-msgstr ""
+msgstr "ランダム値が入った 16 バイトがあるアドレス。"
 
 #. type: TP
 #: build/C/man3/getauxval.3:146
@@ -2793,7 +2793,7 @@ msgid ""
 "disables the use of certain environment variables (see B<ld-linux.so>(8))  "
 "and glibc changes other aspects of its behavior.  (See also "
 "B<secure_getenv>(3).)"
-msgstr ""
+msgstr "この実行ファイルを安全に扱う必要がある場合に 0 以外の値になる。 一番よくある場合としては、 0 以外の値になるのは、 そのプロセスが set-user-ID か set-group-ID されたプログラムを実行している場合である。 他の場合としては、 Linux Security Module が有効になっている場合にも 0 以外の値となる。 この値が 0 以外の場合、 動的リンカーは特定の環境変数の使用を無効化し (B<ld-linux.so>(8) 参照)、 glibc はそのプロセスの動作を別の観点で変更する (B<secure_getenv>(3) 参照)。"
 
 #. type: TP
 #: build/C/man3/getauxval.3:158
@@ -2806,7 +2806,7 @@ msgstr "B<AT_SYSINFO>"
 msgid ""
 "The entry point to the system call function in the vDSO.  Not present/needed "
 "on all architectures (e.g., absent on x86-64)."
-msgstr ""
+msgstr "vDSO のシステムコール関数へのエントリーポイント。すべてのアーキテクチャーで存在するわけではなく、 また必要というわけでもない (例えば x86-64 には存在しない)。"
 
 #. type: TP
 #: build/C/man3/getauxval.3:162
@@ -2820,7 +2820,7 @@ msgid ""
 "The address of a page containing the virtual Dynamic Shared Object (vDSO)  "
 "that the kernel creates in order to provide fast implementations of certain "
 "system calls."
-msgstr ""
+msgstr "仮想動的共有オブジェクト (vDSO; virtual Dynamic Shared Object) が入ったページのアドレス。 vDSO は、 特定のシステムコールの高速な実装を提供するためにカーネルが作成する共有オブジェクトである。"
 
 #. type: TP
 #: build/C/man3/getauxval.3:167
@@ -2831,7 +2831,7 @@ msgstr "B<AT_UCACHEBSIZE>"
 #. type: Plain text
 #: build/C/man3/getauxval.3:170
 msgid "The unified cache block size."
-msgstr ""
+msgstr "ユニファイド (unified) キャッシュのブロックサイズ。"
 
 #. type: TP
 #: build/C/man3/getauxval.3:170
@@ -2842,7 +2842,7 @@ msgstr "B<AT_UID>"
 #. type: Plain text
 #: build/C/man3/getauxval.3:173
 msgid "The real user ID of the thread."
-msgstr ""
+msgstr "このスレッドの実ユーザー ID。"
 
 #. type: Plain text
 #: build/C/man3/getauxval.3:181
@@ -2864,7 +2864,7 @@ msgstr "B<ENOENT> (glibc 2.19 以降)"
 #: build/C/man3/getauxval.3:188
 msgid ""
 "No entry corresponding to I<type> could be found in the auxiliary vector."
-msgstr ""
+msgstr "I<type> に対応するエントリーが補助ベクトルになかった。"
 
 #. type: Plain text
 #: build/C/man3/getauxval.3:192
@@ -2890,7 +2890,7 @@ msgid ""
 "standard information that the dynamic linker usually or always needs.  In "
 "some cases, the same information could be obtained by system calls, but "
 "using the auxiliary vector is cheaper."
-msgstr ""
+msgstr "補助ベクトルの情報を主に使用するのは、 動的ローダー B<ld-linux.so>(8) である。 補助ベクトルは、 カーネルが動的リンカーが通常もしくは常に必要とするある意味標準的な情報を伝えるための便利で効率的なショートカットである。 いくつかの場合では、 同じ情報がシステムコール経由でも取得できるが、 補助ベクトルを使う方がコストがかからない。"
 
 #. type: Plain text
 #: build/C/man3/getauxval.3:214
@@ -2899,7 +2899,7 @@ msgid ""
 "the process address space.  The auxiliary vector supplied to a program can "
 "be viewed by setting the B<LD_SHOW_AUXV> environment variable when running a "
 "program:"
-msgstr ""
+msgstr "補助ベクトルには、 単に、 プロセスのアドレス空間の引き数リストと環境上に存在するだけである。 プログラム実行時に B<LD_SHOW_AUXV> 環境変数を設定すると、 プログラムに渡された補助ベクトルを表示することができる。"
 
 #. type: Plain text
 #: build/C/man3/getauxval.3:216
@@ -2912,7 +2912,7 @@ msgstr "    $ LD_SHOW_AUXV=1 sleep 1\n"
 msgid ""
 "The auxiliary vector of any process can (subject to file permissions)  be "
 "obtained via I</proc/PID/auxv>; see B<proc>(5)  for more information."
-msgstr ""
+msgstr "任意のプロセスの補助ベクトルは (ファイルのアクセス許可があれば) I</proc/PID/auxv> 経由で取得できる。 詳細は B<proc>(5) を参照。"
 
 #. type: SH
 #: build/C/man3/getauxval.3:223 build/C/man3/mktemp.3:105
@@ -2928,7 +2928,7 @@ msgid ""
 "Before the addition of the B<ENOENT> error in glibc 2.19, there was no way "
 "to unambiguously distinguish the case where I<type> could not be found from "
 "the case where the value corresponding to I<type> was zer0."
-msgstr ""
+msgstr "glibc 2.19 で B<ENOENT> エラーが追加される前は、 I<type> が見つからなかった場合と I<type> に対応する値が 0 だった場合を明確に区別する方法がなかった。"
 
 #. type: Plain text
 #: build/C/man3/getauxval.3:236
diff --git a/release/man1/sprof.1 b/release/man1/sprof.1
new file mode 100644 (file)
index 0000000..80b042c
--- /dev/null
@@ -0,0 +1,264 @@
+.\" Copyright (C) 2014 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH SPROF 1 2014\-06\-24 Linux "Linux User Manual"
+.SH 名前
+sprof \- 共有オブジェクトのプロファイルデータを読み出して表示する
+.SH 書式
+.nf
+\fBsprof\fP [\fIoption\fP]... \fIshared\-object\-path\fP [\fIprofile\-data\-path\fP]
+.fi
+.SH 説明
+\fBsprof\fP コマンドは、 最初のコマンドライン引き数で指定された共有オブジェクトのプロファイルの概要を表示する。 2 番目のコマンドライン引き数
+(省略可能) で指定された生成済みのプロファイルデータを使って、 プロファイルの概要が生成される。 プロファイルデータのパス名が省略された場合、
+\fBsprof\fP は、 共有オブジェクトの soname を使ってパス名を元に、 カレントディレクトリに
+\fI<soname>.profile\fP という名前のファイルを探して、 プロファイルデータを特定しようとする。
+.SH オプション
+以下のコマンドラインオプションは生成されるプロファイリング出力を指定する。
+.TP 
+\fB\-c\fP, \fB\-\-call\-pairs\fP
+共有オブジェクトで公開されているインターフェースに対して呼び出し経路のペアのリストを表示する。 各経路が使用された回数も表示される。
+.TP 
+\fB\-p\fP, \fB\-\-flat\-profile\fP
+監視対象のオブジェクトの全関数の、 回数と tick が入った flat profile を生成する。
+.TP 
+\fB\-q\fP, \fB\-\-graph\fP
+コールグラフを生成する。
+.PP
+上記のオプションがどれも指定されなかった場合のデフォルトの動作は、 flat profile とコールグラフが表示される。
+.PP
+以下のコマンドラインオプションも使用できる。
+.TP 
+\fB\-?\fP, \fB\-\-help\fP
+コマンドラインオプションと引き数の概要を表示し終了する。
+.TP 
+\fB\-\-usage\fP
+使用方法の簡潔な概要を表示し終了する。
+.TP 
+\fB\-V\fP, \fB\-\-version\fP
+プログラムのバージョンを表示し終了する。
+.SH 準拠
+\fBsprof\fP コマンドは GNU 拡張であり、 POSIX.1 には存在しない。
+.SH 例
+以下は \fBsprof\fP の使用例を示したものである。 この例では、メインプログラムで共有ライブラリ内の 2 つの関数を呼び出している。 最初に、
+メインプログラムのコードは以下の通りである。
+
+.in +4n
+.nf
+$ \fBcat prog.c\fP
+#include <stdlib.h>
+
+void x1(void);
+void x2(void);
+
+int
+main(int argc, char *argv[])
+{
+    x1();
+    x2();
+    exit(EXIT_SUCCESS);
+}
+.fi
+.in
+.PP
+関数 \fIx1()\fP と \fIx2()\fP は以下のソースファイルで定義されており、 このファイルから共有ライブラリが構成される。
+
+.in +4n
+.nf
+$ \fBcat libdemo.c\fP
+#include <unistd.h>
+
+void
+consumeCpu1(int lim)
+{
+    int j;
+
+    for (j = 0; j < lim; j++)
+       getppid();
+}
+
+void
+x1(void) {
+    int j;
+
+    for (j = 0; j < 100; j++)
+       consumeCpu1(200000);
+}
+
+void
+consumeCpu2(int lim)
+{
+    int j;
+
+    for (j = 0; j < lim; j++)
+       getppid();
+}
+
+void
+x2(void)
+{
+    int j;
+
+    for (j = 0; j < 1000; j++)
+       consumeCpu2(10000);
+}
+.fi
+.in
+.PP
+ここで、 実際の名前は \fIlibdemo.so.1.0.1\fP で soname は \fIlibdemo.so.1\fP で共有ライブラリを構成する。
+
+.in +4n
+.nf
+$ \fBcc \-g \-fPIC \-shared \-Wl,\-soname,libdemo.so.1 \e\fP
+        \fB\-o libdemo.so.1.0.1 libdemo.c\fP
+.fi
+.in
+.PP
+次に、 ライブラリ soname とライブラリのリンカー名へのシンボリックリンクを作成する。
+
+.in +4n
+.nf
+$ \fBln \-sf libdemo.so.1.0.1 libdemo.so.1\fP
+$ \fBln \-sf libdemo.so.1 libdemo.so\fP
+.fi
+.in
+.PP
+続けて、 共有ライブラリとリンクしてメインプログラムをコンパイルし、 プログラムが依存する共有ライブラリの一覧を表示する。
+
+.in +4n
+.nf
+$ \fBcc \-g \-o prog prog.c \-L. \-ldemo\fP
+$ \fBldd prog\fP
+       linux\-vdso.so.1 =>  (0x00007fff86d66000)
+       libdemo.so.1 => not found
+       libc.so.6 => /lib64/libc.so.6 (0x00007fd4dc138000)
+       /lib64/ld\-linux\-x86\-64.so.2 (0x00007fd4dc51f000)
+.fi
+.in
+.PP
+共有ライブラリのプロファイル情報を取得するために、 環境変数 \fBLD_PROFILE\fP にこのライブラリの soname を設定する。
+
+.in +4n
+.nf
+$ \fBexport LD_PROFILE=libdemo.so.1\fP
+.fi
+.in
+.PP
+環境変数 \fBLD_PROFILE_OUTPUT\fP にプロファイル情報を出力するディレクトリのパス名を設定し、
+このディレクトリが存在しない場合は作成する。
+
+.in +4n
+.nf
+$ \fBexport LD_PROFILE_OUTPUT=$(pwd)/prof_data\fP
+$ \fBmkdir \-p $LD_PROFILE_OUTPUT\fP
+.fi
+.in
+.PP
+\fBLD_PROFILE\fP を設定すると、 プロファイルの出力は出力ファイルがすでに存在する場合は「追記」されるので、
+既存のプロファイルデータが存在しないようにしておく。
+
+.in +4n
+.nf
+$ \fBrm \-f $LD_PROFILE_OUTPUT/$LD_PROFILE.profile\fP
+.fi
+.in
+.PP
+次にプログラムを実行し、 プロファイリング出力を生成させる。 プロファイリング出力は \fBLD_PROFILE_OUTPUT\fP
+で指定されたディレクトリにファイルが書き込まれる。
+
+.in +4n
+.nf
+$ \fBLD_LIBRARY_PATH=. ./prog\fP
+$ \fBls prof_data\fP
+libdemo.so.1.profile
+.fi
+.in
+.PP
+\fBsprof \-p\fP オプションを使って、 呼び出し回数と tick 数が含まれる flat プロファイルを生成する。
+
+.in +4n
+.nf
+$ \fBsprof \-p libdemo.so.1 $LD_PROFILE_OUTPUT/libdemo.so.1.profile\fP
+Flat profile:
+
+Each sample counts as 0.01 seconds.
+  %   cumulative   self              self     total
+ time   seconds   seconds    calls  us/call  us/call  name
+ 60.00      0.06     0.06      100   600.00           consumeCpu1
+ 40.00      0.10     0.04     1000    40.00           consumeCpu2
+  0.00      0.10     0.00        1     0.00           x1
+  0.00      0.10     0.00        1     0.00           x2
+.fi
+.in
+.PP
+\fBsprof \-q\fP オプションを使うと、 コールグラフが生成される。
+
+.in +4n
+.nf
+$ \fBsprof \-q libdemo.so.1 $LD_PROFILE_OUTPUT/libdemo.so.1.profile\fP
+
+index % time    self  children    called     name
+
+                0.00    0.00      100/100         x1 [1]
+[0]    100.0    0.00    0.00      100         consumeCpu1 [0]
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+                0.00    0.00        1/1           <UNKNOWN>
+[1]      0.0    0.00    0.00        1         x1 [1]
+                0.00    0.00      100/100         consumeCpu1 [0]
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+                0.00    0.00     1000/1000        x2 [3]
+[2]      0.0    0.00    0.00     1000         consumeCpu2 [2]
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+                0.00    0.00        1/1           <UNKNOWN>
+[3]      0.0    0.00    0.00        1         x2 [3]
+                0.00    0.00     1000/1000        consumeCpu2 [2]
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+.fi
+.in
+.PP
+上記や以下の例で、 "<UNKNOWN>" の文字列は、 識別子がプロファイルされたオブジェクトの外部にあることを表している
+(この例では "<UNKNOWN>" になっているのは \fImain()\fP 内のオブジェクトである)。
+.PP
+\fBsprof \-c\fP オプションを使うと、 呼び出しの組とその発生回数のリストが生成される。
+
+.in +4n
+.nf
+$ \fBsprof \-c libdemo.so.1 $LD_PROFILE_OUTPUT/libdemo.so.1.profile\fP
+<UNKNOWN>                  x1                                 1
+x1                         consumeCpu1                      100
+<UNKNOWN>                  x2                                 1
+x2                         consumeCpu2                     1000
+.fi
+.in
+.SH 関連項目
+\fBgprof\fP(1), \fBldd\fP(1), \fBld.so\fP(8)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.78 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。
index d077b75..819745a 100644 (file)
-.\" Copyright (C) 1996 Free Software Foundation, Inc.
-.\" This file is distributed according to the GNU General Public License.
-.\" See the file COPYING in the top level source directory for details.
+.\" Copyright (C) 2012 Michael Kerrisk <mtk.manpages@gmail.com>
 .\"
-.\" 2006-02-09, some reformatting by Luc Van Oostenryck; some
-.\" reformatting and rewordings by mtk
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
 .\"*******************************************************************
 .\"
 .\" This file was generated with po4a. Translate the source file.
 .\"
 .\"*******************************************************************
-.TH DELETE_MODULE 2 2006\-02\-09 Linux "Linux Programmer's Manual"
+.\"
+.\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
+.\" Translated 2006-07-29, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH DELETE_MODULE 2 2014\-05\-10 Linux "Linux Programmer's Manual"
 .SH 名前
-delete_module \- ã\83­ã\83¼ã\83\80ã\83\96ã\83«ã\83¢ã\82¸ã\83¥ã\83¼ã\83«ã\81®ã\82¨ã\83³ã\83\88ã\83ªã\82\92å\89\8aé\99¤する
+delete_module \- ã\82«ã\83¼ã\83\8dã\83«ã\83¢ã\82¸ã\83¥ã\83¼ã\83«ã\82\92ã\82¢ã\83³ã\83­ã\83¼ã\83\89する
 .SH 書式
 .nf
-\fB#include <linux/module.h>\fP
-.sp
-\fBint delete_module(const char *\fP\fIname\fP\fB);\fP
+\fBint delete_module(const char *\fP\fIname\fP\fB, int \fP\fIflags\fP\fB);\fP
 .fi
+
+\fI注意\fP: この関数の宣言は glibc のヘッダーでは提供されていない。「注意」を参照。
 .SH 説明
-\fBdelete_module\fP()  は、未使用のローダブルモジュールのエントリを削除しようとする。 \fIname\fP が NULL
-の場合、未使用のモジュールのうち「自動削除 (auto\-clean)」 マークがついたものを全て削除する。
-このシステムコールを使うには特権が必要である。
+\fBdelete_module\fP() システムコールは、 \fIname\fP で特定される未使用のロード可能なモジュールのエントリーを削除しようとする。
+モジュールに \fIexit\fP 関数がある場合、 モジュールをアンロードする前にこの関数が実行される。 \fIflags\fP
+引き数は、以下で説明するようにシステムコールの動作を変更するのに使用される。 このシステムコールには特権が必要である。
+
+モジュールの削除は以下のルールにしたがって行われる。
+.IP 1. 4
+このモジュールに依存している (このモジュールで定義されているシンボルを参照している) モジュールがロードされている場合、 この呼び出しは失敗する。
+.IP 2.
+それ以外の場合で、 モジュールの参照カウント (このモジュールを現在使用しているプロセス数) が 0 であれば、 モジュールは直ちにアンロードされる。
+.IP 3.
+.\"    O_TRUNC == KMOD_REMOVE_FORCE in kmod library
+.\"    O_NONBLOCK == KMOD_REMOVE_NOWAIT in kmod library
+モジュールの参照カウントが 0 でない場合、 その動作は \fIflags\fP にセットされたビットによって決まる。 通常の使用時は (「注意」参照)、
+\fBO_NONBLOCK\fP は常に指定され、 \fBO_TRUNC\fP フラグが追加で指定されることがある。
+
+\fIflags\fP の組み合わせが持つ効果は以下のとおりである。
+.RS 4
+.TP 
+\fBflags == O_NONBLOCK\fP
+エラーの場合、 呼び出しは直ちに返る。
+.TP 
+\fBflags == (O_NONBLOCK | O_TRUNC)\fP
+参照カウントが 0 以外かどうかに関わらず、 直ちにモジュールをアンロードする。
+.TP 
+\fB(flags & O_NONBLOCK) == 0\fP
+\fIflags\fP に \fBO_NONBLOCK\fP が指定されなかった場合、 以下のステップで処理が行われる。
+.RS
+.IP * 3
+新しい参照を許可しないように、 指定されたモジュールにマークを付ける。
+.IP *
+モジュールの参照カウントが 0 でない場合、 参照カウントが 0 になるまで、 呼び出し元は割り込み不可のスリープ状態
+(\fBTASK_UNINTERRUPTIBLE\fP) に置かれる。 参照カウントが 0 になった時点で、 呼び出し元の停止が解除される。
+.IP *
+モジュールは通常通りの方法でアンロードされる。
+.RE
+.RE
+.PP
+\fBO_TRUNC\fP フラグには上記のルールに加えてもう一つの効果がある。 デフォルトでは、 モジュールに \fIinit\fP 関数があるが \fIexit\fP
+関数がない場合、 そのモジュールを削除しようとすると失敗する。 しかし、 \fBO_TRUNC\fP が指定された場合、 この要件はスキップされる。
+.PP
+\fBO_TRUNC\fP フラグの使用は危険である! カーネルが \fBCONFIG_MODULE_FORCE_UNLOAD\fP で作成されていない場合、
+このフラグは黙って無視される (通常は \fBCONFIG_MODULE_FORCE_UNLOAD\fP は有効になっている)。
+このフラグを使うとカーネルにゴミが残ることになる (TAINT_FORCED_RMMOD)。
 .SH 返り値
 成功の場合 0 が返される。エラーの場合 \-1 が返され、 \fIerrno\fP に適切な値が設定される。
 .SH エラー
 .TP 
 \fBEBUSY\fP
-そのモジュールは使用中である。
+モジュールは"live" ではない (モジュールがまだ初期化中か、 すでに削除のマークが付けられている)。 モジュールに \fIinit\fP 関数があるが
+\fIexit\fP 関数がなく、 \fIflags\fP に \fBO_TRUNC\fP が指定されていなかった。
 .TP 
 \fBEFAULT\fP
-\fIname\fP がプログラムがアクセスできるアドレス空間の外部にある。
-.TP 
-\fBEINVAL\fP
-\fIname\fP が空文字列である。
+\fIname\fP がプロセスがアクセスできるアドレス空間外の場所を参照している。
 .TP 
 \fBENOENT\fP
 その名前のモジュールが存在しない。
 .TP 
 \fBEPERM\fP
-呼び出し元が特権 (\fBCAP_SYS_MODULE\fP ケーパビリティ) を持っていなかった。
+呼び出し元が特権 (\fBCAP_SYS_MODULE\fP ケーパビリティ) を持っていなかった。 または、 モジュールのアンロードが無効になっている
+(\fBproc\fP(5) の \fI/proc/sys/kernel/modules_disabled\fP を参照)。
+.TP 
+\fBEWOULDBLOCK\fP
+他のモジュールがこのモジュールに依存している。または、 \fIflags\fP に \fBO_NONBLOCK\fP が指定されたが、
+このモジュールの参照カウントが 0 以外で \fIflags\fP に \fBO_TRUNC\fP が指定されていなかった。
 .SH 準拠
 \fBdelete_module\fP()  は Linux 固有である。
+.SH 注意
+\fBdelete_module\fP() システムコールは glibc ではサポートされていない。 glibc ヘッダーでは宣言は提供されていないが、
+歴史の紆余曲折を経て glibc はこのシステムコールに対する ABI を公開していない。
+したがって、このシステムコールを利用するには、自分のコードの中で手動でインターフェースを宣言すればよい。 \fBsyscall\fP(2)
+を使ってシステムコールを起動できる。
+
+\fIflags\fP に \fBO_NONBLOCK\fP が指定されていない場合に起こる可能性がある割り込み不可のスリープは望ましくないと考えられている。
+なぜなら、 スリープしているプロセスは kill できない状態 (unkillable state) のままになるからである。 Linux 3.7
+時点では、 \fBO_NONBLOCK\fP の指定は省略可能だが、 将来のカーネルでは必須になるだろう。
+.SS "Linux 2.4 以前"
+Linux 2.4 以前では、 このシステムコールの引き数は 1 つだけであった。
+
+\fB int delete_module(const char *\fP\fIname\fP\fB);\fP
+
+\fIname\fP が NULL の場合、 auto\-clean のマークがついたすべての未使用のモジュールが削除される。
+
+Linux 2.4 以前の \fBdelete_module\fP() の動作のより詳細な違いは、 現在のところこのマニュアルページでは説明\fIしない\fP。
 .SH 関連項目
-\fBcreate_module\fP(2), \fBinit_module\fP(2), \fBquery_module\fP(2)
+\fBcreate_module\fP(2), \fBinit_module\fP(2), \fBquery_module\fP(2), \fBlsmod\fP(8),
+\fBmodprobe\fP(8), \fBrmmod\fP(8)
 .SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.41 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.78 の一部
 である。プロジェクトの説明とバグ報告に関する情報は
 http://www.kernel.org/doc/man\-pages/ に書かれている。
index c99f9f3..c975d67 100644 (file)
+.\" Copyright (C) 2012 Michael Kerrisk <mtk.manpages@gmail.com>
+.\" A few fragments remain from a version
 .\" Copyright (C) 1996 Free Software Foundation, Inc.
-.\" This file is distributed according to the GNU General Public License.
-.\" See the file COPYING in the top level source directory for details.
 .\"
-.\" 2006-02-09, some reformatting by Luc Van Oostenryck; some
-.\" reformatting and rewordings by mtk
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
 .\"*******************************************************************
 .\"
 .\" This file was generated with po4a. Translate the source file.
 .\"
 .\"*******************************************************************
-.TH INIT_MODULE 2 2006\-02\-09 Linux "Linux Programmer's Manual"
+.\"
+.\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
+.\" Translated 2006-07-29, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH INIT_MODULE 2 2014\-05\-10 Linux "Linux Programmer's Manual"
 .SH 名前
-init_module \- ローダブルモジュールのエントリを初期化する
+init_module, finit_module \- カーネルモジュールをロードする
 .SH 書式
 .nf
-\fB#include <linux/module.h>\fP
-.sp
-\fBint init_module(const char *\fP\fIname\fP\fB, struct module *\fP\fIimage\fP\fB);\fP
+\fBint init_module(void *\fP\fImodule_image\fP\fB, unsigned long \fP\fIlen\fP\fB,\fP
+\fB                const char *\fP\fIparam_values\fP\fB);\fP
+
+\fBint finit_module(int \fP\fIfd\fP\fB, const char *\fP\fIparam_values\fP\fB,\fP
+\fB                 int \fP\fIflags\fP\fB);\fP
 .fi
+
+\fI注意\fP: glibc では、 ヘッダーファイルでの \fBinit_module\fP() の宣言はなく、 \fBfinit_module\fP()
+のラッパー関数も提供されていない。 「注意」の節を参照。
 .SH 説明
-\fBinit_module\fP()  は再配置されたモジュールイメージをカーネル空間にロードし、 そのモジュールの \fIinit\fP 関数を実行する。
+\fBinit_module\fP() は ELF イメージをカーネル空間にロードし、 必要なシンボルの配置変更を行い、
+モジュールパラメーターを呼び出し元から指定された値に初期化し、 最後にそのモジュールの \fIinit\fP 関数を実行する。
+このシステムコールには特権が必要である。
+
+\fImodule_image\fP 引き数はロードするバイナリーイメージが入ったバッファーを指し、 \fIlen\fP はバッファーのサイズを指定する。
+モジュールイメージは、 実行中のカーネル用に作成された有効な ELF イメージである必要がある。
+
+\fIparam_values\fP 引き数はモジュールパラメーター値を指定するスペース区切りの文字列である (モジュールパラメーターは
+\fBmodule_param\fP() や \fBmodule_param_array\fP() を使ってモジュール内で定義される)。
+カーネルはこの文字列を解釈し、指定されたパラメーターを初期化する。 各パラメーター指定は以下の形式である。
+
+\fIname\fP[\fB=\fP\fIvalue\fP[\fB,\fP\fIvalue\fP...]]
+
+パラメーター \fIname\fP はモジュール内で \fImodule_param\fP() を使って定義されているパラメーターのいずれか一つである (Linux
+カーネルのソースファイル \fIinclude/linux/moduleparam.h\fP を参照)。 パラメーター \fIvalue\fP は \fIbool\fP
+か \fIinvbool\fP パラメーターの場合は省略可能である。 配列パラメーターの値はカンマ区切りのリストで指定される。
+.SS finit_module()
+.\" commit 34e1169d996ab148490c01b65b4ee371cf8ffba2
+.\" https://lwn.net/Articles/519010/
+\fBfinit_module\fP() システムコールは \fBinit_module\fP() と同様だが、 ファイルディスクリプター \fIfd\fP
+からモジュールをロードする。 カーネルモジュールの信頼性をファイルシステムにおける場所から判定できる場合、この方法は有効である。
+この方法が利用できる場合、 モジュールの信頼性を判定するのに暗号で署名されたモジュールを使用することによるオーバーヘッドを避ける事ができる。
+\fIparam_values\fP 引き数は \fBinit_module\fP() と同じである。
+
+.\" commit 2f3238aebedb243804f58d62d57244edec4149b2
+\fIflags\fP 引き数で \fBfinit_module\fP() の動作を変更できる。 \fIflags\fP は以下のフラグの 0
+個以上の論理和をとって作成したビットマスクである。
+.TP 
+\fBMODULE_INIT_IGNORE_MODVERSIONS\fP
+シンボルのバージョンハッシュを無視する。
+.TP 
+\fBMODULE_INIT_IGNORE_VERMAGIC\fP
+カーネルのバージョン magic を無視する。
+.PP
+.\" http://www.tldp.org/HOWTO/Module-HOWTO/basekerncompat.html
+.\" is dated, but informative
+そのモジュールがロードされるカーネルに合致することを保証するためのモジュールに組み込みの安全チェックがある。 これらのチェックは、
+モジュールの作成時に記録され、 モジュールのロード時に検査される。 最初に、 モジュールはカーネルのバージョン番号と主要な機能 (CPU 種別など)
+が入った "vermagic" 文字列を記録する。 次に、 モジュールが \fBCONFIG_MODVERSIONS\fP
+設定オプションを有効にして作成されている場合、 バージョンハッシュがモジュールが使用するシンボルごとに記録される。
+このハッシュはシンボルに対応する関数の引き数と返り値の型を基づいて計算される。 この場合、
+シンボルのバージョンハッシュは十分に信頼できると考えられているため、  "vermagic" 文字列内のカーネルのバージョン番号は無視される。
+
+\fBMODULE_INIT_IGNORE_VERMAGIC\fP フラグは "vermagic" 文字列を無視することを意味し、
+\fBMODULE_INIT_IGNORE_MODVERSIONS\fP フラグはシンボルのバージョンハッシュを無視することを意味する。
+カーネルが強制ロードを許可するように作成されている場合 (\fBCONFIG_MODULE_FORCE_LOAD\fP が有効になっている場合)、
+モジュールのロードは継続され、 そうでない場合は不正なモジュールに対して返るのと同じ \fBENOEXEC\fP で失敗する。
+.SH 返り値
+成功の場合、これらのシステムコールは 0 を返す。エラーの場合 \-1 が返され、 \fIerrno\fP に適切な値が設定される。
+.SH エラー
+.TP 
+\fBEBADMSG\fP (Linux 3.7 以降)
+モジュールの署名が正しい形式ではない。
+.TP 
+\fBEBUSY\fP
+このモジュールがシンボル参照を解決する際にタイムアウトが起こった。
+.TP 
+\fBEFAULT\fP
+アドレス引き数が、プロセスがアクセスできるアドレス空間外の場所を参照していた。
+.TP 
+\fBENOKEY\fP (Linux 3.7 以降)
+.\" commit 48ba2462ace6072741fd8d0058207d630ce93bf1
+.\" commit 1d0059f3a468825b5fc5405c636a2f6e02707ffa
+.\" commit 106a4ee258d14818467829bf0e12aeae14c16cd7
+モジュールの署名が無効であるか、 カーネルがこのモジュール用の鍵を持っていない。 このエラーが返されるのは、 カーネルが
+\fBCONFIG_MODULE_SIG_FORCE\fP で作成されている場合のみである。 カーネルでこのオプションが有効になっていない場合、
+無効なモジュールや署名されていないモジュールはカーネルのゴミになる。
+.TP 
+\fBENOMEM\fP
+メモリ不足。
+.TP 
+\fBEPERM\fP
+呼び出し元が特権 (\fBCAP_SYS_MODULE\fP ケーパビリティ) を持っていなかった。もしくはモジュールのロードが無効になっている
+(\fBproc\fP(5) の \fI/proc/sys/kernel/modules_disabled\fP を参照)。
+.PP
+\fBinit_module\fP() では以下のエラーも発生する場合がある。
+.TP 
+\fBEEXIST\fP
+その名前のモジュールがすでにロードされている。
+.TP 
+\fBEINVAL\fP
+.\" .TP
+.\" .BR EINVAL " (Linux 2.4 and earlier)"
+.\" Some
+.\" .I image
+.\" slot is filled in incorrectly,
+.\" .I image\->name
+.\" does not correspond to the original module name, some
+.\" .I image\->deps
+.\" entry does not correspond to a loaded module,
+.\" or some other similar inconsistency.
+\fIparam_values\fP が無効、 または \fImodule_image\fP の ELF イメージの一部分に矛盾がある。
+.TP 
+\fBENOEXEC\fP
+\fImodule_image\fP で指定されたバイナリーイメージが ELF イメージではない、 もしくは無効な ELF イメージや別のアーキテクチャー用の
+ELF イメージである。
+.PP
+\fBfinit_module\fP() では以下のエラーも発生する場合がある。
+.TP 
+\fBEBADF\fP
+\fIfd\fP が参照するファイルが読み出し用にオープンされていない。
+.TP 
+\fBEFBIG\fP
+\fIfd\fP が参照するファイルが大きすぎる。
+.TP 
+\fBEINVAL\fP
+\fIflags\fP が無効である。
+.TP 
+\fBENOEXEC\fP
+\fIfd\fP がオープンされたファイルを参照していない。
+.PP
+上記のエラーに加え、 モジュールの \fIinit\fP 関数が実行されてエラーが発生した場合には、 \fBinit_module\fP() や
+\fBfinit_module\fP() は失敗し、 \fIerrno\fP に \fIinit\fP 関数が返した値が設定される。
+.SH バージョン
+\fBfinit_module\fP() は Linux 3.8 以降で利用可能である。
+.SH 準拠
+\fBinit_module\fP() と \fBfinit_module\fP() は Linux 固有である。
+.SH 注意
+\fBinit_module\fP() システムコールは glibc ではサポートされていない。 glibc ヘッダーでは宣言は提供されていないが、
+歴史の紆余曲折を経て glibc はこのシステムコールに対する ABI を公開していない。
+したがって、このシステムコールを利用するには、自分のコードの中で手動でインターフェースを宣言すればよい。 \fBsyscall\fP(2)
+を使ってシステムコールを起動できる。
+
+glibc は \fBfinit_module\fP() に対するラッパー関数を提供していない。 \fBsyscall\fP(2) を使って呼び出すこと。
+
+現在ロードされているモジュールに関する情報は \fI/proc/modules\fP および \fI/sys/module\fP
+以下のモジュール単位のサブディレクトリ内のファイルツリーで参照できる。
+
+Linux カーネルのソースファイル \fIinclude/linux/module.h\fP には背景に関する有用な情報がある。
+.SS "Linux 2.4 以前"
 .PP
-モジュールイメージは先頭部分に module 構造体があり、その後ろに 適切なコードとデータが続く。 この module
-構造体は以下のように定義されている:
+Linux 2.4 以前では \fBinit_module\fP() システムコールはかなり違ったものであった。
+
+\fB#include <linux/module.h>\fP
+
+\fB int init_module(const char *\fP\fIname\fP\fB, struct module *\fP\fIimage\fP\fB);\fP
+
+(ユーザー空間アプリケーションは \fBquery_module\fP() を呼び出してどのバージョンの \fBinit_module\fP()
+が利用可能かを検出できる。 \fBquery_module\fP() の呼び出しは Linux 2.6 以降ではエラー \fBENOSYS\fP で失敗する。)
+
+古いバージョンのシステムコールは、 \fIimage\fP が指す再配置されたモジュールイメージをカーネル空間にロードし、 モジュールの \fIinit\fP
+関数を実行する。 呼び出し元には再配置されたイメージを提供する責任がある (Linux 2.6 以降では \fBinit_module\fP()
+システムコールが再配置自体を行う)。
+.PP
+モジュールイメージは先頭部分に module 構造体があり、その後ろに 適切なコードとデータが続く。 Linux 2.2 以降では module
+構造体は以下のように定義されている。
 .PP
 .in +4n
 .nf
@@ -50,35 +220,12 @@ struct module {
 .fi
 .in
 .PP
-\fInext\fP と \fIrefs\fP 以外の全てのポインタ要素はモジュール本体内部を指し、 カーネル空間での適切な値で初期化される
+\fInext\fP と \fIrefs\fP 以外の全てのポインタ要素はモジュール本体内部を指し、 カーネル空間での適切な値で初期化される
 (つまり、モジュールの残りの 部分で再配置される) ことが期待される。
-.PP
-このシステムコールを使うには特権が必要である。
-.SH 返り値
-成功の場合 0 が返される。エラーの場合 \-1 が返され、 \fIerrno\fP に適切な値が設定される。
-.SH エラー
-.TP 
-\fBEBUSY\fP
-モジュールの初期化ルーチンが失敗した。
-.TP 
-\fBEFAULT\fP
-\fIname\fP や \fIimage\fP がプログラムがアクセスできるアドレス空間の外部にある。
-.TP 
-\fBEINVAL\fP
-一部の \fIimage\fP スロットにおかしな値が入っている。または \fIimage\->name\fP
-が元のモジュール名と一致していない。または、一部の \fIimage\->deps\fP エントリがロードされたモジュールに対応していない。
-または、他に同様の矛盾が起こっている。
-.TP 
-\fBENOENT\fP
-その名前のモジュールが存在しない。
-.TP 
-\fBEPERM\fP
-呼び出し元が特権 (\fBCAP_SYS_MODULE\fP ケーパビリティ) を持っていなかった。
-.SH 準拠
-\fBinit_module\fP()  は Linux 固有である。
 .SH 関連項目
-\fBcreate_module\fP(2), \fBdelete_module\fP(2), \fBquery_module\fP(2)
+\fBcreate_module\fP(2), \fBdelete_module\fP(2), \fBquery_module\fP(2), \fBlsmod\fP(8),
+\fBmodprobe\fP(8)
 .SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.41 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.78 の一部
 である。プロジェクトの説明とバグ報告に関する情報は
 http://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/release/man3/getauxval.3 b/release/man3/getauxval.3
new file mode 100644 (file)
index 0000000..2a0ed58
--- /dev/null
@@ -0,0 +1,175 @@
+.\" Copyright 2012 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" See also https://lwn.net/Articles/519085/
+.\"
+.\" FIXME glibc 2.18 added AT_HWCAP2, which needs to e documented
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH GETAUXVAL 3 2014\-08\-19 GNU "Linux Programmer's Manual"
+.SH 名前
+getauxval \- 補助ベクトルから値を取得する
+.SH 書式
+.nf
+\fB#include <sys/auxv.h>\fP
+.sp
+\fBunsigned long getauxval(unsigned long \fP\fItype\fP\fB);\fP
+.fi
+.SH 説明
+\fBgetauxval\fP() 関数は補助ベクトル (auxiliary vector) から値を取得する。 補助ベクトルは、
+プログラムが実行される際に、 カーネルの ELF バイナリーローダーがユーザー空間にある種の情報を渡すのに使われる仕組みである。
+
+補助ベクトルの各エントリーは、 このエントリーを示すタイプとそのタイプの値のペアで構成される。 引き数 \fItype\fP が指定されると、
+\fBgetauxval\fP() は対応する値を返す。
+
+それぞれの \fItype\fP に対して返される値の詳細を以下に示す。 すべてのアーキテクチャーですべて \fItype\fP 値が存在するわけではない。
+.TP 
+\fBAT_BASE\fP
+プログラムインタープリター (通常は動的ローダー) のベースアドレス。
+.TP 
+\fBAT_BASE_PLATFORM\fP
+実プラットフォームを示す文字列。 \fBAT_PLATFORM\fP と異なる値の場合がある。 (PowerPC のみ)
+.TP 
+\fBAT_CLKTCK\fP
+\fBtimes\fP(2) のカウントが行われる周波数。 この値は \fIsysconf(_SC_CLK_TCK)\fP でも取得できる。
+.TP 
+\fBAT_DCACHEBSIZE\fP
+データキャッシュのブロックサイズ。
+.TP 
+\fBAT_EGID\fP
+このスレッドの実効グループ ID。
+.TP 
+\fBAT_ENTRY\fP
+実行ファイルのエントリーアドレス。
+.TP 
+\fBAT_EUID\fP
+このスレッドの実効ユーザー ID。
+.TP 
+\fBAT_EXECFD\fP
+プログラムのファイルディスクリプター。
+.TP 
+\fBAT_EXECFN\fP
+実行プログラムに使用されたパス名。
+.TP 
+\fBAT_FLAGS\fP
+フラグ (未使用)。
+.TP 
+\fBAT_FPUCW\fP
+使用された FPU 制御ワード (SuperH アーキテクチャーのみ)。 カーネルが実行した FPU 初期化に関する情報を提供するためのものである。
+.TP 
+\fBAT_GID\fP
+このスレッドの実グループ ID。
+.TP 
+\fBAT_HWCAP\fP
+プロセッサーの詳細な機能 (capabilities) を示す複数バイトからなるビットマスクへのポインターである。
+このビットマスクの内容はハードウェア依存である (例えば、 Intel x86 アーキテクチャーに関する詳細はカーネルのソースファイル
+\fIarch/x86/include/asm/cpufeature.h\fP を参照)。 同じ情報を人が読みやすい形になっているのが
+\fI/proc/cpuinfo\fP である。
+.TP 
+\fBAT_ICACHEBSIZE\fP
+.\" .TP
+.\" .BR AT_IGNORE
+.\" .TP
+.\" .BR AT_IGNOREPPC
+.\" .TP
+.\" .BR AT_NOTELF
+命令キャッシュのブロックサイズ。
+.TP 
+\fBAT_PAGESZ\fP
+システムページサイズ (\fIsysconf(_SC_PAGESIZE)\fP が返す値と同じ)。
+.TP 
+\fBAT_PHDR\fP
+実行プログラムのプログラムヘッダーのアドレス。
+.TP 
+\fBAT_PHENT\fP
+プログラムヘッダーエントリーのサイズ。
+.TP 
+\fBAT_PHNUM\fP
+プログラムヘッダー数。
+.TP 
+\fBAT_PLATFORM\fP
+このプログラムが実行されているハードウェアプラットフォームを特定する文字列へのポインター。 動的リンカーは \fIrpath\fP
+値の解釈を行う際にこの値を使用する。
+.TP 
+\fBAT_RANDOM\fP
+ランダム値が入った 16 バイトがあるアドレス。
+.TP 
+\fBAT_SECURE\fP
+この実行ファイルを安全に扱う必要がある場合に 0 以外の値になる。 一番よくある場合としては、 0 以外の値になるのは、 そのプロセスが
+set\-user\-ID か set\-group\-ID されたプログラムを実行している場合である。 他の場合としては、 Linux Security
+Module が有効になっている場合にも 0 以外の値となる。 この値が 0 以外の場合、 動的リンカーは特定の環境変数の使用を無効化し
+(\fBld\-linux.so\fP(8) 参照)、 glibc はそのプロセスの動作を別の観点で変更する (\fBsecure_getenv\fP(3) 参照)。
+.TP 
+\fBAT_SYSINFO\fP
+vDSO のシステムコール関数へのエントリーポイント。すべてのアーキテクチャーで存在するわけではなく、 また必要というわけでもない (例えば
+x86\-64 には存在しない)。
+.TP 
+\fBAT_SYSINFO_EHDR\fP
+仮想動的共有オブジェクト (vDSO; virtual Dynamic Shared Object) が入ったページのアドレス。 vDSO は、
+特定のシステムコールの高速な実装を提供するためにカーネルが作成する共有オブジェクトである。
+.TP 
+\fBAT_UCACHEBSIZE\fP
+ユニファイド (unified) キャッシュのブロックサイズ。
+.TP 
+\fBAT_UID\fP
+このスレッドの実ユーザー ID。
+.SH 返り値
+成功すると、 \fBgetauxval\fP() は \fItype\fP に対応する値を返す。 \fItype\fP が見つからない場合には 0 を返す。
+.SH エラー
+.TP 
+\fBENOENT\fP (glibc 2.19 以降)
+.\" commit b9ab448f980e296eac21ac65f53783967cc6037b
+\fItype\fP に対応するエントリーが補助ベクトルになかった。
+.SH バージョン
+\fBgetauxval\fP() 関数は glibc バージョン 2.16 で追加された。
+.SH 属性
+.SS "マルチスレッディング (pthreads(7) 参照)"
+関数 \fBgetauxval\fP() はスレッドセーフである。
+.SH 準拠
+この関数は非標準で glibc による拡張である。
+.SH 注意
+補助ベクトルの情報を主に使用するのは、 動的ローダー \fBld\-linux.so\fP(8) である。 補助ベクトルは、
+カーネルが動的リンカーが通常もしくは常に必要とするある意味標準的な情報を伝えるための便利で効率的なショートカットである。 いくつかの場合では、
+同じ情報がシステムコール経由でも取得できるが、 補助ベクトルを使う方がコストがかからない。
+
+補助ベクトルには、 単に、 プロセスのアドレス空間の引き数リストと環境上に存在するだけである。 プログラム実行時に \fBLD_SHOW_AUXV\fP
+環境変数を設定すると、 プログラムに渡された補助ベクトルを表示することができる。
+
+    $ LD_SHOW_AUXV=1 sleep 1
+
+任意のプロセスの補助ベクトルは (ファイルのアクセス許可があれば) \fI/proc/PID/auxv\fP 経由で取得できる。 詳細は \fBproc\fP(5)
+を参照。
+.SH バグ
+glibc 2.19 で \fBENOENT\fP エラーが追加される前は、 \fItype\fP が見つからなかった場合と \fItype\fP に対応する値が 0
+だった場合を明確に区別する方法がなかった。
+.SH 関連項目
+\fBsecure_getenv\fP(3), \fBvdso\fP(7), \fBld\-linux.so\fP(8)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.78 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/release/man3/mallinfo.3 b/release/man3/mallinfo.3
new file mode 100644 (file)
index 0000000..0d34543
--- /dev/null
@@ -0,0 +1,240 @@
+.\" t
+.\" Copyright (c) 2012 by Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH MALLINFO 3 2012\-05\-06 Linux "Linux Programmer's Manual"
+.SH 名前
+mallinfo \- メモリー割り当て情報を取得する
+.SH 書式
+\fB#include <malloc.h>\fP
+
+\fBstruct mallinfo mallinfo(void);\fP
+.SH 説明
+\fBmallinfo\fP() 関数は、 \fBmalloc\fP(3) や一連の関数により実行されたメモリー
+割り当てに関する情報を格納した構造体のコピーを返す。
+この構造体は以下のように定義されている。
+.PP
+.in +4n
+.nf
+struct mallinfo {
+    int arena;     /* Non\-mmapped space allocated (bytes) */
+    int ordblks;   /* Number of free chunks */
+    int smblks;    /* Number of free fastbin blocks */
+    int hblks;     /* Number of mmapped regions */
+    int hblkhd;    /* Space allocated in mmapped regions (bytes) */
+    int usmblks;   /* Maximum total allocated space (bytes) */
+    int fsmblks;   /* Space in freed fastbin blocks (bytes) */
+    int uordblks;  /* Total allocated space (bytes) */
+    int fordblks;  /* Total free space (bytes) */
+    int keepcost;  /* Top\-most, releasable space (bytes) */
+};
+.fi
+.in
+.PP
+\fImallinfo\fP 構造体の各フィールドには以下の情報が格納される。
+.TP  10
+\fIarena\fP
+\fBmmap\fP(2) 以外の手段で割り当てられた総メモリー量 (例えばヒープに割り当てられたメモリー) 。
+この数字には使用中のブロックやフリーリスト上のブロックも含まれる。
+.TP 
+\fIordblks\fP
+通常の (つまり fastbin ではない) 未使用ブロック数。
+.TP 
+\fIsmblks\fP
+fastbin 未使用ブロック数 (\fBmallopt\fP(3) 参照)。
+.TP 
+\fIhblks\fP
+\fBmmap\fP(2) を使って現在割り当てられているブロック数 (\fBmallopt\fP(3) の \fBM_MMAP_THRESHOLD\fP
+の議論を参照)。
+.TP 
+\fIhblkhd\fP
+\fBmmap\fP(2) を使って現在割り当てられているブロックのバイト数。
+.TP 
+\fIusmblks\fP
+割り当てた空間の最高点 ("highwater mark")、 つまり、 これまでの中での最大の割り当て量。
+このフィールドはスレッド化されていない環境でのみ収集される。
+.TP 
+\fIfsmblks\fP
+fastbin フリーブロックの総バイト数。
+.TP 
+\fIuordblks\fP
+使用中の割り当てメモリーで使われているバイト数。
+.TP 
+\fIfordblks\fP
+フリーブロックの総バイト数。
+.TP 
+\fIkeepcost\fP
+.\" .SH VERSIONS
+.\" Available already in glibc 2.0, possibly earlier
+ヒープの一番上にある解放可能な未使用の空間の大きさ。 この値は \fBmalloc_trim\fP(3) で理想的な場合に解放できる最大のバイト数である
+(理想的というのは、 ページ境界の制限などを無視した場合である。
+.SH 準拠
+この関数は POSIX や C 標準では規定されていない。 多くの System V 由来のシステムに同様の関数が存在し、 SVID
+では同様の関数が規定されていた。
+.SH バグ
+.\" FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=208
+.\" See the 24 Aug 2011 mail by Paul Pluzhnikov:
+.\"     "[patch] Fix mallinfo() to accumulate results for all arenas"
+.\" on libc-alpha@sourceware.org
+\fBこれらの情報はメインのメモリー割り当て領域に対するもののみである。\fP 他の領域の割り当ては対象にならない。
+他の領域の情報も取得できる別の手段については \fBmalloc_stats\fP(3) や \fBmalloc_info\fP(3) を参照。
+
+\fImallinfo\fP 構造体の各フィールドは \fIint\fP 型である。 しかし、 いくつかの内部管理用の値は \fIlong\fP 型の場合もあるので、
+報告される値が一周してしまい、 不正確になる可能性がある。
+.SH 例
+以下のプログラムは \fBmallinfo\fP() を利用して、 メモリーブロックの割り当て、解放のそれぞれ前後でメモリー割り当ての統計情報を取得する。
+統計情報は標準出力に表示される。
+
+最初の 2 つのコマンドライン引き数は \fBmalloc\fP(3) で割り当てるブロック数とサイズを指定する。
+
+残りの 3 つの引き数は、どの割り当てられたブロックを \fBfree\fP(3) で解放すべきかを指定する。 これらの 3 つの引き数の指定は任意で、
+最初のものから順に以下の情報を指定する。 1 つ目の引き数は、 ブロックを解放するループで使用するステップサイズを指定する (デフォルト値は 1 で、
+1 は指定した範囲のすべてのブロックを解放することを意味する)。 2 つ目の引き数は、 解放する先頭ブロックの場所番号を指定する (デフォルト値は 0
+で、 0 は先頭の割り当て済みブロックを意味する)。 3 つ目の引き数は、 解放する最終ブロックの場所番号よりひとつ大きい値を指定する
+(デフォルト値は最大ブロック番号よりもひとつ大きい値である)。 これらの 3 つの引き数が省略された場合、
+デフォルトではすべての割り当てられたブロックが解放される。
+
+以下のプログラムの実行例では、 100 バイトの割り当てを 1000 回実行し、 割り当てたブロックの 2 つに 1 つを解放する。
+.PP
+.in +4n
+.nf
+$ \fB./a.out 1000 100 2\fP
+============== Before allocating blocks ==============
+Total non\-mmapped bytes (arena):       0
+# of free chunks (ordblks):            1
+# of free fastbin blocks (smblks):     0
+# of mapped regions (hblks):           0
+Bytes in mapped regions (hblkhd):      0
+Max. total allocated space (usmblks):  0
+Free bytes held in fastbins (fsmblks): 0
+Total allocated space (uordblks):      0
+Total free space (fordblks):           0
+Topmost releasable block (keepcost):   0
+
+============== After allocating blocks ==============
+Total non\-mmapped bytes (arena):       135168
+# of free chunks (ordblks):            1
+# of free fastbin blocks (smblks):     0
+# of mapped regions (hblks):           0
+Bytes in mapped regions (hblkhd):      0
+Max. total allocated space (usmblks):  0
+Free bytes held in fastbins (fsmblks): 0
+Total allocated space (uordblks):      104000
+Total free space (fordblks):           31168
+Topmost releasable block (keepcost):   31168
+
+============== After freeing blocks ==============
+Total non\-mmapped bytes (arena):       135168
+# of free chunks (ordblks):            501
+# of free fastbin blocks (smblks):     0
+# of mapped regions (hblks):           0
+Bytes in mapped regions (hblkhd):      0
+Max. total allocated space (usmblks):  0
+Free bytes held in fastbins (fsmblks): 0
+Total allocated space (uordblks):      52000
+Total free space (fordblks):           83168
+Topmost releasable block (keepcost):   31168
+.fi
+.in
+.SS プログラムのソース
+\&
+.nf
+#include <malloc.h>
+#include "tlpi_hdr.h"
+
+static void
+display_mallinfo(void)
+{
+    struct mallinfo mi;
+
+    mi = mallinfo();
+
+    printf("Total non\-mmapped bytes (arena):       %d\en", mi.arena);
+    printf("# of free chunks (ordblks):            %d\en", mi.ordblks);
+    printf("# of free fastbin blocks (smblks):     %d\en", mi.smblks);
+    printf("# of mapped regions (hblks):           %d\en", mi.hblks);
+    printf("Bytes in mapped regions (hblkhd):      %d\en", mi.hblkhd);
+    printf("Max. total allocated space (usmblks):  %d\en", mi.usmblks);
+    printf("Free bytes held in fastbins (fsmblks): %d\en", mi.fsmblks);
+    printf("Total allocated space (uordblks):      %d\en", mi.uordblks);
+    printf("Total free space (fordblks):           %d\en", mi.fordblks);
+    printf("Topmost releasable block (keepcost):   %d\en", mi.keepcost);
+}
+
+int
+main(int argc, char *argv[])
+{
+#define MAX_ALLOCS 2000000
+    char *alloc[MAX_ALLOCS];
+    int numBlocks, j, freeBegin, freeEnd, freeStep;
+    size_t blockSize;
+
+    if (argc < 3 || strcmp(argv[1], "\-\-help") == 0)
+        usageErr("%s num\-blocks block\-size [free\-step [start\-free "
+                "[end\-free]]]\en", argv[0]);
+
+    numBlocks = atoi(argv[1]);
+    blockSize = atoi(argv[2]);
+    freeStep = (argc > 3) ? atoi(argv[3]) : 1;
+    freeBegin = (argc > 4) ? atoi(argv[4]) : 0;
+    freeEnd = (argc > 5) ? atoi(argv[5]) : numBlocks;
+
+    printf("============== Before allocating blocks ==============\en");
+    display_mallinfo();
+
+    for (j = 0; j < numBlocks; j++) {
+        if (numBlocks >= MAX_ALLOCS)
+            fatal("Too many allocations");
+
+        alloc[j] = malloc(blockSize);
+        if (alloc[j] == NULL)
+            errExit("malloc");
+    }
+
+    printf("\en============== After allocating blocks ==============\en");
+    display_mallinfo();
+
+    for (j = freeBegin; j < freeEnd; j += freeStep)
+        free(alloc[j]);
+
+    printf("\en============== After freeing blocks ==============\en");
+    display_mallinfo();
+
+    exit(EXIT_SUCCESS);
+}
+.fi
+.SH 関連項目
+.ad l
+.nh
+\fBmmap\fP(2), \fBmalloc\fP(3), \fBmalloc_info\fP(3), \fBmalloc_stats\fP(3),
+\fBmalloc_trim\fP(3), \fBmallopt\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.78 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。
index 18c8377..fb41962 100644 (file)
--- a/stats/ld
+++ b/stats/ld
@@ -1,3 +1,2 @@
 # pagename,#complete,#remaining,#all
 rtld-audit.7,71,60,131
-sprof.1,46,25,71
index 0659578..e69de29 100644 (file)
@@ -1,3 +0,0 @@
-# pagename,#complete,#remaining,#all
-delete_module.2,39,21,60
-init_module.2,47,32,79
index c287ff7..be181f0 100644 (file)
@@ -1,5 +1,4 @@
 # pagename,#complete,#remaining,#all
-mallinfo.3,48,17,65
 mallopt.3,60,50,110
 mcheck.3,29,25,54
 mtrace.3,26,11,37
index 93ace5b..8594105 100644 (file)
@@ -1,3 +1,2 @@
 # pagename,#complete,#remaining,#all
-getauxval.3,52,34,86
 vdso.7,176,8,184
index cb7192d..dfa2a89 100644 (file)
@@ -8,7 +8,7 @@
 ○:LDP man-pages:3.78:2014/09/06:memusagestat:1:2015/01/24::amotoki@gmail.com:Akihiro Motoki:
 ○:LDP man-pages:3.78:2014/09/01:mtrace:1:2015/01/24::amotoki@gmail.com:Akihiro Motoki:
 ○:LDP man-pages:3.78:2014/09/27:pldd:1:2015/01/24::amotoki@gmail.com:Akihiro Motoki:
-×:LDP man-pages:3.78:2014/06/24:sprof:1:::::
+○:LDP man-pages:3.78:2014/06/24:sprof:1:2015/01/31::amotoki@gmail.com:Akihiro Motoki:
 ○:LDP man-pages:3.78:2008/11/14:time:1:2015/01/24::amotoki@gmail.com:Akihiro Motoki:
 @:LDP man-pages:3.78:2015/01/22:_Exit:2:_exit:2:
 @:LDP man-pages:3.78:2014/09/21:__clone2:2:clone:2:
@@ -52,7 +52,7 @@
 ○:LDP man-pages:3.78:2014/09/06:connect:2:2015/01/24::amotoki@gmail.com:Akihiro Motoki:
 @:LDP man-pages:3.78:2015/01/22:creat:2:open:2:
 ○:LDP man-pages:3.78:2014/05/10:create_module:2:2015/01/24::amotoki@gmail.com:Akihiro Motoki:
-×:LDP man-pages:3.78:2014/05/10:delete_module:2:::::
+○:LDP man-pages:3.78:2014/05/10:delete_module:2:2015/01/31::amotoki@gmail.com:Akihiro Motoki:
 ○:LDP man-pages:3.78:2015/01/22:dup:2:2015/01/24::amotoki@gmail.com:Akihiro Motoki:
 @:LDP man-pages:3.78:2015/01/22:dup2:2:dup:2:
 @:LDP man-pages:3.78:2015/01/22:dup3:2:dup:2:
@@ -85,7 +85,7 @@
 @:LDP man-pages:3.78:2014/08/19:fdatasync:2:fsync:2:
 @:LDP man-pages:3.78:2013/02/12:fdetach:2:unimplemented:2:
 @:LDP man-pages:3.78:2014/04/06:fgetxattr:2:getxattr:2:
-:LDP man-pages:3.78:2014/05/10:finit_module:2:init_module:2:
+:LDP man-pages:3.78:2014/05/10:finit_module:2:init_module:2:
 @:LDP man-pages:3.78:2014/02/06:flistxattr:2:listxattr:2:
 ○:LDP man-pages:3.78:2014/09/21:flock:2:2015/01/24::amotoki@gmail.com:Akihiro Motoki:
 ○:LDP man-pages:3.78:2014/05/28:fork:2:2015/01/24::amotoki@gmail.com:Akihiro Motoki:
 ○:LDP man-pages:3.78:2012/12/31:idle:2:2015/01/24::argrath@yo.rim.or.jp:Kentaro Shirakata:
 @:LDP man-pages:3.78:2012/12/31:inb:2:outb:2:
 @:LDP man-pages:3.78:2012/12/31:inb_p:2:outb:2:
-×:LDP man-pages:3.78:2014/05/10:init_module:2:::::
+○:LDP man-pages:3.78:2014/05/10:init_module:2:2015/01/31::amotoki@gmail.com:Akihiro Motoki:
 @:LDP man-pages:3.78:2012/12/31:inl:2:outb:2:
 @:LDP man-pages:3.78:2012/12/31:inl_p:2:outb:2:
 ○:LDP man-pages:3.78:2014/07/08:inotify_add_watch:2:2015/01/24::amotoki@gmail.com:Akihiro Motoki:
 @:LDP man-pages:3.78:2003/09/09:getaliasbyname_r:3:setaliasent:3:
 @:LDP man-pages:3.78:2003/09/09:getaliasent:3:setaliasent:3:
 @:LDP man-pages:3.78:2003/09/09:getaliasent_r:3:setaliasent:3:
-×:LDP man-pages:3.78:2014/08/19:getauxval:3:::::
+○:LDP man-pages:3.78:2014/08/19:getauxval:3:2015/01/31::amotoki@gmail.com:Akihiro Motoki:
 @:LDP man-pages:3.78:2013/12/31:getc:3:fgetc:3:
 @:LDP man-pages:3.78:2008/08/29:getc_unlocked:3:unlocked_stdio:3:
 @:LDP man-pages:3.78:2013/12/31:getchar:3:fgetc:3:
 @:LDP man-pages:3.78:2014/05/28:major:3:makedev:3:
 ○:LDP man-pages:3.78:2014/05/28:makecontext:3:2015/01/24::amotoki@gmail.com:Akihiro Motoki:
 ○:LDP man-pages:3.78:2014/05/28:makedev:3:2015/01/24::amotoki@gmail.com:Akihiro Motoki:
-×:LDP man-pages:3.78:2012/05/06:mallinfo:3:::::
+○:LDP man-pages:3.78:2012/05/06:mallinfo:3:2015/01/31::amotoki@gmail.com:Akihiro Motoki:
 ○:LDP man-pages:3.78:2014/05/21:malloc:3:2015/01/24::amotoki@gmail.com:Akihiro Motoki:
 ○:LDP man-pages:3.78:2014/06/13:malloc_get_state:3:2015/01/27::amotoki@gmail.com:Akihiro Motoki:
 ○:LDP man-pages:3.78:2010/10/13:malloc_hook:3:2015/01/24::amotoki@gmail.com:Akihiro Motoki:
index 4ddd9cf..dc8958c 100644 (file)
 <TR><TD>request_key.2</TD><TD>24/53</TD><TD>54.72</TD></TR>
 <TR><TD ALIGN="center" COLSPAN=3 BGCOLOR="Yellow"><B>ld</B></TD></TR>
 <TR><TD>rtld-audit.7</TD><TD>60/131</TD><TD>54.20</TD></TR>
-<TR><TD>sprof.1</TD><TD>25/71</TD><TD>64.79</TD></TR>
-<TR><TD ALIGN="center" COLSPAN=3 BGCOLOR="Yellow"><B>linux_module</B></TD></TR>
-<TR><TD>delete_module.2</TD><TD>21/60</TD><TD>65.00</TD></TR>
-<TR><TD>init_module.2</TD><TD>32/79</TD><TD>59.49</TD></TR>
 <TR><TD ALIGN="center" COLSPAN=3 BGCOLOR="Yellow"><B>locale</B></TD></TR>
 <TR><TD>localedef.1</TD><TD>49/125</TD><TD>60.80</TD></TR>
 <TR class="over70"><TD>newlocale.3</TD><TD>24/89</TD><TD>73.03</TD></TR>
@@ -36,7 +32,6 @@
 <TR><TD>ptrace.2</TD><TD>166/296</TD><TD>43.92</TD></TR>
 <TR><TD>quotactl.2</TD><TD>47/102</TD><TD>53.92</TD></TR>
 <TR><TD ALIGN="center" COLSPAN=3 BGCOLOR="Yellow"><B>memory</B></TD></TR>
-<TR class="over70"><TD>mallinfo.3</TD><TD>17/65</TD><TD>73.85</TD></TR>
 <TR><TD>mallopt.3</TD><TD>50/110</TD><TD>54.55</TD></TR>
 <TR><TD>mcheck.3</TD><TD>25/54</TD><TD>53.70</TD></TR>
 <TR class="over70"><TD>mtrace.3</TD><TD>11/37</TD><TD>70.27</TD></TR>
@@ -56,8 +51,7 @@
 <TR><TD>cpuid.4</TD><TD>13/24</TD><TD>45.83</TD></TR>
 <TR><TD>hpsa.4</TD><TD>23/57</TD><TD>59.65</TD></TR>
 <TR><TD ALIGN="center" COLSPAN=3 BGCOLOR="Yellow"><B>stdlib</B></TD></TR>
-<TR><TD>getauxval.3</TD><TD>34/86</TD><TD>60.47</TD></TR>
 <TR class="over80"><TD>vdso.7</TD><TD>8/184</TD><TD>95.65</TD></TR>
-<TR><TD COLSPAN=3>Total 34 pages</TD></TR>
+<TR><TD COLSPAN=3>Total 29 pages</TD></TR>
 </TABLE>
 </BODY></HTML>