--- /dev/null
+.\" Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
+.\" and Copyright (C) 2013 Michael Kerrisk <mtk.manpages@gmail.com>
+.\" Written by Ivana Varekova <varekova@redhat.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 PERFMONCTL 2 2013\-02\-13 Linux "Linux Programmer's Manual"
+.SH 名前
+perfmonctl \- IA\-64 の PMU (性能監視ユニット) のインターフェース
+.SH 書式
+.nf
+\fB#include <syscall.h>\fP
+\fB#include <perfmon.h>\fP
+.sp
+\fBlong perfmonctl(int \fP\fIfd\fP\fB, int \fP\fIcmd\fP\fB, void *\fP\fIarg\fP\fB, int \fP\fInarg\fP\fB);\fP
+.fi
+\fI注\fP: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節を参照。
+.SH 説明
+IA\-64 固有の \fBperfmonctl\fP() システムコールは PMU (性能監視ユニット; performance monitoring
+unit) へのインターフェースを提供する。 PMU は PMD (performance monitoring data) レジスターと PMC
+(performance monitoring control) レジスターで構成され、 ハードウェアの統計を収集する。
+
+\fBperfmonctl\fP() は、 操作 \fIcmd\fP を \fIarg\fP で指定された入力引き数で行う。 引き数の数は \fInarg\fP で規定される。
+\fIfd\fP 引き数は操作対象の perfmon コンテキストを指定する。
+
+\fIcmd\fP に指定できる値は以下のとおりである。
+.TP
+\fBPFM_CREATE_CONTEXT\fP
+.nf
+\fBperfmonctl(int \fP\fIfd\fP\fB, PFM_CREATE_CONTEXT, pfarg_context_t *\fP\fIctxt\fP\fB, 1);\fP
+.fi
+コンテキストを用意する。
+
+\fIfd\fP 引き数は無視される。 新しい perfmon コンテキストを \fIctxt\fP で指定した内容で作成し、 そのファイルディスクリプターを
+\fIctxt\->ctx_fd\fP で返す。
+
+ファイルディスクリプターはそれ以降の \fBperfmonctl\fP() の呼び出しで使用したり、 \fBread\fP(2) を使ってイベント通知
+(\fIpfm_msg_t\fP 型) を読み出したりするのに使用できる。 このファイルディスクリプターは \fBselect\fP(2), \fBpoll\fP(2),
+\fBepoll\fP(7) で状態監視 (ポーリング) することができる。
+
+コンテキストを破棄するには、 そのファイルディスクリプターに対して \fBclose\fP(2) を呼び出す。
+.TP
+\fBPFM_WRITE_PMCS\fP
+.\" pfm_write_pmcs()
+.nf
+\fBperfmonctl(int \fP\fIfd\fP\fB, PFM_WRITE_PMCS, pfarg_reg_t *\fP\fIpmcs\fP\fB, n);\fP
+.fi
+PMC レジスターを設定する。
+.TP
+\fBPFM_WRITE_PMDS\fP
+.nf
+\fBperfmonctl(int \fP\fIfd\fP\fB, PFM_WRITE_PMDS, pfarg_reg_t *\fP\fIpmds\fP\fB, n);\fP
+.fi
+.\" pfm_write_pmds()
+PMD レジスターを設定する。
+.TP
+\fBPFM_READ_PMDS\fP
+.\" pfm_read_pmds()
+.nf
+\fBperfmonctl(int \fP\fIfd\fP\fB, PFM_READ_PMDS, pfarg_reg_t *\fP\fIpmds\fP\fB, n);\fP
+.fi
+PMD レジスターを読み出す。
+.TP
+\fBPFM_START\fP
+.\" pfm_start()
+.nf
+.\" .BI "perfmonctl(int " fd ", PFM_START, arg, 1);
+\fBperfmonctl(int \fP\fIfd\fP\fB, PFM_START, NULL, 0);\fP
+.fi
+監視を開始する。
+.TP
+\fBPFM_STOP\fP
+.\" pfm_stop()
+.nf
+\fBperfmonctl(int \fP\fIfd\fP\fB, PFM_STOP, NULL, 0);\fP
+.fi
+監視を停止する。
+.TP
+\fBPFM_LOAD_CONTEXT\fP
+.\" pfm_context_load()
+.nf
+\fBperfmonctl(int \fP\fIfd\fP\fB, PFM_LOAD_CONTEXT, pfarg_load_t *\fP\fIlargs\fP\fB, 1);\fP
+.fi
+指定したコンテキストをスレッドに接続する。
+.TP
+\fBPFM_UNLOAD_CONTEXT\fP
+.\" pfm_context_unload()
+.nf
+\fBperfmonctl(int \fP\fIfd\fP\fB, PFM_UNLOAD_CONTEXT, NULL, 0);\fP
+.fi
+指定したコンテキストをスレッドが切り離す。
+.TP
+\fBPFM_RESTART\fP
+.\" pfm_restart()
+.nf
+\fBperfmonctl(int \fP\fIfd\fP\fB, PFM_RESTART, NULL, 0);\fP
+.fi
+オーバーフロー通知を受信した後、 監視を再開する。
+.TP
+\fBPFM_GET_FEATURES\fP
+.\" pfm_get_features()
+.nf
+\fBperfmonctl(int \fP\fIfd\fP\fB, PFM_GET_FEARURES, pfarg_features_t *\fP\fIarg\fP\fB, 1);\fP
+.fi
+.TP
+\fBPFM_DEBUG\fP
+.\" pfm_debug()
+.nf
+\fBperfmonctl(int \fP\fIfd\fP\fB, PFM_DEBUG, \fP\fIval\fP\fB, 0);\fP
+.fi
+\fIval\fP が 0 以外の場合、デバッグモードを有効にする。 そうでない場合、 無効にする。
+.TP
+\fBPFM_GET_PMC_RESET_VAL\fP
+.\" pfm_get_pmc_reset()
+.nf
+\fBperfmonctl(int \fP\fIfd\fP\fB, PFM_GET_PMC_RESET_VAL, pfarg_reg_t * \fP\fIreq\fP\fB, n);\fP
+.fi
+.\"
+.\"
+.\" .TP
+.\" .B PFM_CREATE_EVTSETS
+.\"
+.\" create or modify event sets
+.\" .nf
+.\" .BI "perfmonctl(int " fd ", PFM_CREATE_EVTSETS, pfarg_setdesc_t *desc , n);
+.\" .fi
+.\" .TP
+.\" .B PFM_DELETE_EVTSETS
+.\" delete event sets
+.\" .nf
+.\" .BI "perfmonctl(int " fd ", PFM_DELETE_EVTSET, pfarg_setdesc_t *desc , n);
+.\" .fi
+.\" .TP
+.\" .B PFM_GETINFO_EVTSETS
+.\" get information about event sets
+.\" .nf
+.\" .BI "perfmonctl(int " fd ", PFM_GETINFO_EVTSETS, pfarg_setinfo_t *info, n);
+.\" .fi
+PMC レジスターをデフォルト値にリセットする。
+.SH 返り値
+\fBperfmonctl\fP() は操作が成功すると 0 を返す。 エラーの場合、 \-1 が返り、 \fIerrno\fP にエラーの原因を示す値が設定される。
+.SH バージョン
+\fBperfmonctl\fP() は Linux 2.4 以降で利用可能である。
+.SH 準拠
+\fBperfmonctl\fP() は Linux 固有で、 IA\-64 アーキテクチャーでのみ利用できる。
+.SH 注意
+glibc はこのシステムコールに対するラッパー関数を提供していない。 \fBsyscall\fP(2) を使って呼び出すこと。
+.SH 関連項目
+\fBgprof\fP(1)
+
+perfmon2 インターフェース仕様
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.78 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。
--- /dev/null
+.\" Copyright (C) 2011 Christopher Yeoh <cyeoh@au1.ibm.com>
+.\" and Copyright (C) 2012 Mike Frysinger <vapier@gentoo.org>
+.\" and Copyright (C) 2012 Michael Kerrisk <mtk.man-pages@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
+.\"
+.\" Commit fcf634098c00dd9cd247447368495f0b79be12d1
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH PROCESS_VM_READV 2 2014\-08\-19 Linux "Linux Programmer's Manual"
+.SH 名前
+process_vm_readv, process_vm_writev \- プロセスのアドレス空間間でデータを転送する
+.SH 書式
+.nf
+\fB#include <sys/uio.h>\fP
+
+\fBssize_t process_vm_readv(pid_t \fP\fIpid\fP\fB,\fP
+\fB const struct iovec *\fP\fIlocal_iov\fP\fB,\fP
+\fB unsigned long \fP\fIliovcnt\fP\fB,\fP
+\fB const struct iovec *\fP\fIremote_iov\fP\fB,\fP
+\fB unsigned long \fP\fIriovcnt\fP\fB,\fP
+\fB unsigned long \fP\fIflags\fP\fB);\fP
+
+\fBssize_t process_vm_writev(pid_t \fP\fIpid\fP\fB,\fP
+\fB const struct iovec *\fP\fIlocal_iov\fP\fB,\fP
+\fB unsigned long \fP\fIliovcnt\fP\fB,\fP
+\fB const struct iovec *\fP\fIremote_iov\fP\fB,\fP
+\fB unsigned long \fP\fIriovcnt\fP\fB,\fP
+\fB unsigned long \fP\fIflags\fP\fB);\fP
+.fi
+.sp
+.in -4n
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照):
+.in
+.sp
+\fBprocess_vm_readv\fP(), \fBprocess_vm_writev\fP():
+.PD 0
+.ad l
+.RS 4
+\fB_GNU_SOURCE\fP
+.RE
+.ad
+.PD
+.fi
+.SH 説明
+これらのシステムコールは、 呼び出し元プロセス (「ローカルプロセス」) と \fIpid\fP で指定されるプロセス (「リモートプロセス」)
+のアドレス空間間でデータを転送する。 データの移動は、 カーネル空間を経由することなく、 2 つのプロセスのアドレス空間間で直接行われる。
+
+\fBprocess_vm_readv\fP() システムコールは、 リモートプロセスからローカルプロセスへデータを転送する。 転送対象のデータは
+\fIremote_iov\fP と \fIriovcnt\fP で指定される。 \fIremote_iov\fP はプロセス \fIpid\fP
+におけるアドレス範囲を指定する配列へのポインターで、 \fIriovcnt\fP は \fIremote_iov\fP の要素数を指定する。 データは
+\fIlocal_iov\fP と \fIliovcnt\fP で指定された場所に転送される。 \fIlocal_iov\fP
+は呼び出し元プロセスにおけるアドレス範囲を指定する配列で、 \fIliovcnt\fP は \fIlocal_iov\fP の要素数を指定する。
+
+\fBprocess_vm_writev\fP() システムコールは \fBprocess_vm_readv\fP() の逆で、
+ローカルプロセスからリモートプロセスにデータを転送する。 転送の方向が違う以外は、 引き数 \fIliovcnt\fP, \fIlocal_iov\fP,
+\fIriovcnt\fP, \fIremote_iov\fP は \fBprocess_vm_readv\fP() と同じ意味を持つ。
+
+引き数 \fIlocal_iov\fP と \fIremote_iov\fP は \fIiovec\fP 構造体の配列へのポイン
+タである。 \fIiovec\fP 構造体は \fI<sys/uio.h>\fP で以下のように定義
+されている:
+
+.in +4n
+.nf
+struct iovec {
+ void *iov_base; /* Starting address */
+ size_t iov_len; /* Number of bytes to transfer */
+};
+.fi
+.in
+
+バッファーは配列の順序で処理される。 つまり、 \fBprocess_vm_readv\fP() は \fIlocal_iov\fP[0]
+が一杯になるまでデータを詰めてから、 \fIlocal_iov\fP[1] に進むことを意味する。 同様に、 \fIremote_iov\fP[0]
+を全部読み出してから \fIremote_iov\fP[1] に進み、 以降も同様である。
+
+同様に、 \fBprocess_vm_writev\fP() は \fIlocal_iov[0]\fP の内容を全部読み出してから \fIlocal_iov[1]\fP
+に進み、 書き込み先でも \fIremote_iov[0]\fP が一杯になってから \fIremote_iov[1]\fP に進む。
+
+長さ \fIremote_iov[i].iov_len\fP と \fIlocal_iov[i].iov_len\fP は同じである必要はない。 したがって、
+ローカル側で 1 つのバッファーのデータがリモート側で複数のバッファーに分割されることがあるし、 その逆も起こりえる。
+
+\fIflags\fP 引き数は現在使用されておらず、 0 を設定しなければならない。
+
+.\" In time, glibc might provide a wrapper that works around this limit,
+.\" as is done for readv()/writev()
+\fIliovcnt\fP と \fIriovcnt\fP で指定される値は \fBIOV_MAX\fP 以下でなければならない (\fBIOV_MAX\fP は
+\fI<limits.h>\fP で定義されており、 \fIsysconf(_SC_IOV_MAX)\fP の呼び出しでも入手できる)。
+
+要素数引き数と \fIlocal_iov\fP のチェックは、 すべてのデータ転送に先立って行われる。 要素数が大きすぎる場合や \fIlocal_iov\fP
+が無効な場合、 アドレスがローカルプロセスがアクセスできない領域を参照している場合は、 配列のどの要素も処理されず、 すぐにエラーが返される。
+
+ただし、 これらのシステムコールは、 実際に読み出し/書き込みを行う直前までリモートプロセスのメモリー領域のチェックを行わない点に注意すること。
+結果として、 \fIremote_iov\fP の要素の一つがリモートプロセスで無効なメモリー領域を参照している場合、 部分的な読み出し/書き込み
+(「返り値」の節を参照) が行われることになる。 これ以降は読み出し/書き込みは行われない。 リモートプロセスから長さ不明のデータ (例えば NULL
+終端された C 文字列) を読み出す際で、 リモート側の一つの \fIiovec\fP 要素が複数のメモリーページ (通常は 4KiB)
+にまたがらないようにしている場合は、 この点に注意が必要である。
+(リモートからの読み出しを 2 つの \fIremote_iov\fP 要素に分割し、 1 つの \fIlocal_iov\fP
+要素への書き込みにマージすればよい。 最初の読み出しでページ境界まで読み出し、 次の読み出しを次のページ境界から行う。)
+
+他のプロセスからの読み出しや他のプロセスへの書き込みを行うには、 呼び出し元がケーパビリティ \fBCAP_SYS_PTRACE\fP
+を持っていなければならない、もしくは、 リモートプロセスの実ユーザー ID、 実効ユーザー ID、 保存 set\-user\-ID
+が呼び出し元の実ユーザー ID と一致し、 かつリモートプロセスの実グループ ID、 実効グループ ID、 保存 set\-group\-ID
+が呼び出し元の実グループ ID と一致していなければならない。 (ここで必要なアクセス許可は、 リモートプロセスに対して \fBptrace\fP(2) の
+\fBPTRACE_ATTACH\fP を実行するのに必要な許可と全く同じである。)
+.SH 返り値
+成功すると、 \fBprocess_vm_readv\fP() は読み出したバイト数を返し、 \fBprocess_vm_writev\fP()
+は書き込んだバイト数を返す。 この返り値は、 読み出し/書き込みが部分的に行われた場合には、 要求された総バイト数よりも小さくなることがある
+(部分的な転送は \fIiovec\fP 要素単位に行われ、 これらのシステムコールが一つの \fIiovec\fP 要素の一部だけが転送されることはない)。
+呼び出し元は返り値を検査して、 部分的な読み出し/書き込みが起こったかどうかを判定できる。
+
+エラーの場合は \-1 が返され、 \fIerrno\fP が適切に設定される。
+.SH エラー
+.TP
+\fBEINVAL\fP
+\fIlocal_iov\fP か \fIremote_iov\fP のいずれかの \fIiov_len\fP の合計値が \fIssize_t\fP
+で表現できる値を超えている。
+.TP
+\fBEINVAL\fP
+\fIflags\fP が 0 でない。
+.TP
+\fBEINVAL\fP
+\fIliovcnt\fP か \fIriovcnt\fP が大きすぎる。
+.TP
+\fBEFAULT\fP
+\fIlocal_iov\fP で指定されたメモリーが呼び出し元がアクセス可能なアドレス空間の外にある。
+.TP
+\fBEFAULT\fP
+\fIremote_iov\fP で指定されたメモリーがプロセス \fIpid\fP がアクセス可能なアドレス空間の外にある。
+.TP
+\fBENOMEM\fP
+\fIiovec\fP 構造体の内部コピーのためのメモリーを割り当てできなかった。
+.TP
+\fBEPERM\fP
+呼び出し側がプロセス \fIpid\fP のアドレス空間に対するアクセス許可を
+持っていない。
+.TP
+\fBESRCH\fP
+ID が \fIpid\fP のプロセスが存在しない。
+.SH バージョン
+これらのシステムコールは Linux 3.2 で追加された。ライブラリによる
+サポートは glibc バージョン 2.15 以降で提供されている。
+.SH 準拠
+これらのシステムコールは非標準で Linux による拡張である。
+.SH 注意
+\fBprocess_vm_readv\fP() と \fBprocess_vm_writev\fP() により実行されるデータ転送をどのように行ったとしても、
+これらがアトミックに行われる保証はない。
+
+.\" Original user is MPI, http://www.mcs.anl.gov/research/projects/mpi/
+.\" See also some benchmarks at http://lwn.net/Articles/405284/
+.\" and http://marc.info/?l=linux-mm&m=130105930902915&w=2
+これらのシステムコールは、 (共有メモリーやパイプなどを使った場合に必要となる 2 回のコピーではなく)
+1 回のコピー処理でメッセージの交換を許すことで、 高速なメッセージ送信をできるようにするために設計された。
+.SH 例
+以下のサンプルコードは \fBprocess_vm_readv\fP() の使用例を示すものである。 このコードは PID 10 のプロセスのアドレス
+0x10000 から 20 バイトを読み取り、 最初の 10 バイトを \fIbuf1\fP に、 残りの 10 バイトを \fIbuf2\fP に書き込む。
+.sp
+.nf
+#include <sys/uio.h>
+
+int
+main(void)
+{
+ struct iovec local[2];
+ struct iovec remote[1];
+ char buf1[10];
+ char buf2[10];
+ ssize_t nread;
+ pid_t pid = 10; /* PID of remote process */
+
+ local[0].iov_base = buf1;
+ local[0].iov_len = 10;
+ local[1].iov_base = buf2;
+ local[1].iov_len = 10;
+ remote[0].iov_base = (void *) 0x10000;
+ remote[0].iov_len = 20;
+
+ nread = process_vm_readv(pid, local, 2, remote, 1, 0);
+ if (nread != 20)
+ return 1;
+ else
+ return 0;
+}
+.fi
+.SH 関連項目
+\fBreadv\fP(2), \fBwritev\fP(2)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.78 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。
--- /dev/null
+.\" 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 MALLOC_GET_STATE 3 2014\-06\-13 GNU "Linux Programmer's Manual"
+.SH 名前
+malloc_get_state, malloc_set_state \- malloc 実装の状態を保存/復元する
+.SH 書式
+.nf
+\fB#include <malloc.h>\fP
+.sp
+\fBvoid* malloc_get_state(void);\fP
+
+\fBint malloc_set_state(void *\fP\fIstate\fP\fB);\fP
+.fi
+.SH 説明
+\fBmalloc_get_state\fP() 関数は \fBmalloc\fP(3) 内部のすべての管理用変数を記録する (ただし、 ヒープの実際の内容と
+\fBmalloc_hook\fP(3) 関数ポインターの状態は記録されない)。 状態は \fBmalloc\fP(3) で動的に確保されたシステム依存の
+opaque な (内部構造は分からない) データ構造体に記録され、 関数の結果としてそのデータ構造体へのポインターが返される
+(このメモリーは呼び出し元が責任をもって \fBfree\fP(3) する必要がある)。
+
+\fBmalloc_set_state\fP() 関数は、 \fBmalloc\fP(3) 内部のすべての管理用変数を \fIstate\fP が指す opaque
+なデータ構造体から復元する。
+.SH 返り値
+成功すると、 \fBmalloc_get_state\fP() は新しく割り当てられたデータ構造体へのポインターを返す。 エラーの場合
+(例えば、データ構造体に必要なメモリーが割り当てられなかったなど)、 \fBmalloc_get_state\fP() は NULL を返す。
+
+.\" if(ms->magic != MALLOC_STATE_MAGIC) return -1;
+.\" /* Must fail if the major version is too high. */
+.\" if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
+成功すると、 \fBmalloc_set_state\fP() は 0 を返す。 実装が \fIstate\fP
+が正しく作成されたデータ構造体を指していないと検出した場合、 \fBmalloc_set_state\fP() は \-1 を返す。 \fIstate\fP
+が参照するデータ構造体のバージョンがこの実装が認識するバージョンよりも新しいと実装が検出した場合、 \fBmalloc_set_state\fP() は \-2
+を返す。
+.SH 準拠
+これらの関数は GNU による拡張である。
+.SH 注意
+これらの関数が役に立つのは、 この \fBmalloc\fP(3) の実装が共有ライブラリの一部として使用され、
+ヒープの内容が何か他の方法で保存/復元される場合である。 この手法は GNU Emacs が「ダンプ」関数 ("dumping" function)
+を実装するのに使用されている。
+
+.\" i.e., calls __malloc_check_init()
+.\" i.e., malloc checking is not already in use
+.\" and the caller requested malloc checking
+これらの関数がフック関数ポインターの保存と復元を行うことはない。 ただし、 2 つ例外がある。 \fBmalloc_get_state\fP()
+が呼び出された際に malloc チェック (\fBmallopt\fP(3) 参照) が使用中の場合、 \fBmalloc_set_state\fP()
+は可能なら malloc チェックフックをリセットする。 また、 保存された状態の malloc チェックが使用中でないが、 呼び出し元が malloc
+チェックを要求していた場合、 フックは 0 にリセットされる。
+.SH 関連項目
+\fBmalloc\fP(3), \fBmallopt\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.78 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。
--- /dev/null
+.\" 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 MALLOC_TRIM 3 2014\-05\-28 Linux "Linux Programmer's Manual"
+.SH 名前
+malloc_trim \- ヒープの一番上から未使用メモリーを解放する
+.SH 書式
+\fB#include <malloc.h>\fP
+
+\fBint malloc_trim(size_t \fP\fIpad\fP\fB);\fP
+.SH 説明
+\fBmalloc_trim\fP() 関数は (適切な引き数で \fBsbrk\fP(2) を呼び出して) ヒープの一番上の未使用メモリーの解放を試みる。
+
+\fIpad\fP 引き数は、 ヒープの一番上から切り詰める際に残す未使用領域の量を指定する。 この引き数が 0 の場合、
+ヒープの一番上の最小量のメモリーだけを維持できる (つまり 1 ページかそれ未満)。 0 以外の引き数を指定すると、
+ヒープの一番上にある程度の量の未使用領域を残し、 将来の割り当てを \fBsbrk\fP(2) でヒープを拡張せずに行えるようにできる。
+.SH 返り値
+\fBmalloc_trim\fP() 関数はメモリーが実際に解放されシステムに戻された場合に 1 を返し、 どのメモリーも解放できなかった場合は 0
+を返す。
+.SH エラー
+.\" .SH VERSIONS
+.\" Available already in glibc 2.0, possibly earlier
+エラーは定義されていない。
+.SH 準拠
+この関数は GNU による拡張である。
+.SH 注意
+この関数は、 特定の状況では \fBfree\fP(3) により自動的に呼び出される。 \fBmallopt\fP(3) の \fBM_TOP_PAD\fP と
+\fBM_TRIM_THRESHOLD\fP の議論を参照。
+
+この関数は、 ヒープの一番上以外の場所にある未使用メモリーを解放することはできない。
+
+.\" malloc/malloc.c::mTRIm():
+.\" return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
+この関数はメイン領域のメモリーだけを解放する。
+.SH 関連項目
+\fBsbrk\fP(2), \fBmalloc\fP(3), \fBmallopt\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.78 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2015-01-23 22:24+0900\n"
-"PO-Revision-Date: 2015-01-26 13:09+0900\n"
+"PO-Revision-Date: 2015-01-27 02:55+0900\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
#. type: Plain text
#: build/C/man2/perfmonctl.2:30
msgid "perfmonctl - interface to IA-64 performance monitoring unit"
-msgstr ""
+msgstr "perfmonctl - IA-64 の PMU (性能監視ユニット) のインターフェース"
#. type: Plain text
#: build/C/man2/perfmonctl.2:34
"PMU (performance monitoring unit). The PMU consists of PMD (performance "
"monitoring data) registers and PMC (performance monitoring control) "
"registers, which gather hardware statistics."
-msgstr ""
+msgstr "IA-64 固有の B<perfmonctl>() システムコールは PMU (性能監視ユニット; performance monitoring unit) へのインターフェースを提供する。 PMU は PMD (performance monitoring data) レジスターと PMC (performance monitoring control) レジスターで構成され、 ハードウェアの統計を収集する。"
#. type: Plain text
#: build/C/man2/perfmonctl.2:57
"B<perfmonctl>() applies the operation I<cmd> to the input arguments "
"specified by I<arg>. The number of arguments is defined by I<narg>. The "
"I<fd> argument specifies the perfmon context to operate on."
-msgstr ""
+msgstr "B<perfmonctl>() は、 操作 I<cmd> を I<arg> で指定された入力引き数で行う。 引き数の数は I<narg> で規定される。 I<fd> 引き数は操作対象の perfmon コンテキストを指定する。"
#. type: Plain text
#: build/C/man2/perfmonctl.2:61
msgid "Supported values for I<cmd> are:"
-msgstr ""
+msgstr "I<cmd> に指定できる値は以下のとおりである。"
#. type: TP
#: build/C/man2/perfmonctl.2:61
#: build/C/man2/perfmonctl.2:65
#, no-wrap
msgid "B<perfmonctl(int >I<fd>B<, PFM_CREATE_CONTEXT, pfarg_context_t *>I<ctxt>B<, 1);>\n"
-msgstr ""
+msgstr "B<perfmonctl(int >I<fd>B<, PFM_CREATE_CONTEXT, pfarg_context_t *>I<ctxt>B<, 1);>\n"
#. type: Plain text
#: build/C/man2/perfmonctl.2:67
msgid "Set up a context."
-msgstr ""
+msgstr "コンテキストを用意する。"
#. type: Plain text
#: build/C/man2/perfmonctl.2:74
"The I<fd> parameter is ignored. A new perfmon context is created as "
"specified in I<ctxt> and its file descriptor is returned in I<ctxt-"
"E<gt>ctx_fd>."
-msgstr ""
+msgstr "I<fd> 引き数は無視される。 新しい perfmon コンテキストを I<ctxt> で指定した内容で作成し、 そのファイルディスクリプターを I<ctxt-E<gt>ctx_fd> で返す。"
#. type: Plain text
#: build/C/man2/perfmonctl.2:86
"can be used to read event notifications (type I<pfm_msg_t>) using "
"B<read>(2). The file descriptor is pollable using B<select>(2), B<poll>(2), "
"and B<epoll>(7)."
-msgstr ""
+msgstr "ファイルディスクリプターはそれ以降の B<perfmonctl>() の呼び出しで使用したり、 B<read>(2) を使ってイベント通知 (I<pfm_msg_t> 型) を読み出したりするのに使用できる。 このファイルディスクリプターは B<select>(2), B<poll>(2), B<epoll>(7) で状態監視 (ポーリング) することができる。"
#. type: Plain text
#: build/C/man2/perfmonctl.2:90
msgid ""
"The context can be destroyed by calling B<close>(2) on the file descriptor."
-msgstr ""
+msgstr "コンテキストを破棄するには、 そのファイルディスクリプターに対して B<close>(2) を呼び出す。"
#. type: TP
#: build/C/man2/perfmonctl.2:90
#. type: Plain text
#: build/C/man2/perfmonctl.2:97
msgid "Set PMC registers."
-msgstr ""
+msgstr "PMC レジスターを設定する。"
#. type: TP
#: build/C/man2/perfmonctl.2:97
#. type: Plain text
#: build/C/man2/perfmonctl.2:104
msgid "Set PMD registers."
-msgstr ""
+msgstr "PMD レジスターを設定する。"
#. type: TP
#: build/C/man2/perfmonctl.2:104
#. type: Plain text
#: build/C/man2/perfmonctl.2:111
msgid "Read PMD registers."
-msgstr ""
+msgstr "PMD レジスターを読み出す。"
#. type: TP
#: build/C/man2/perfmonctl.2:111
#. type: Plain text
#: build/C/man2/perfmonctl.2:119
msgid "Start monitoring."
-msgstr ""
+msgstr "監視を開始する。"
#. type: TP
#: build/C/man2/perfmonctl.2:119
#. type: Plain text
#: build/C/man2/perfmonctl.2:126
msgid "Stop monitoring."
-msgstr ""
+msgstr "監視を停止する。"
#. type: TP
#: build/C/man2/perfmonctl.2:126
#. type: Plain text
#: build/C/man2/perfmonctl.2:133
msgid "Attach the context to a thread."
-msgstr ""
+msgstr "指定したコンテキストをスレッドに接続する。"
#. type: TP
#: build/C/man2/perfmonctl.2:133
#. type: Plain text
#: build/C/man2/perfmonctl.2:140
msgid "Detach the context from a thread."
-msgstr ""
+msgstr "指定したコンテキストをスレッドが切り離す。"
#. type: TP
#: build/C/man2/perfmonctl.2:140
#. type: Plain text
#: build/C/man2/perfmonctl.2:147
msgid "Restart monitoring after receiving an overflow notification."
-msgstr ""
+msgstr "オーバーフロー通知を受信した後、 監視を再開する。"
#. type: TP
#: build/C/man2/perfmonctl.2:147
#. type: Plain text
#: build/C/man2/perfmonctl.2:162
msgid "If I<val> is nonzero, enable debugging mode, otherwise disable."
-msgstr ""
+msgstr "I<val> が 0 以外の場合、デバッグモードを有効にする。 そうでない場合、 無効にする。"
#. type: TP
#: build/C/man2/perfmonctl.2:162
#. type: Plain text
#: build/C/man2/perfmonctl.2:190
msgid "Reset PMC registers to default values."
-msgstr ""
+msgstr "PMC レジスターをデフォルト値にリセットする。"
#. type: Plain text
#: build/C/man2/perfmonctl.2:196
msgid ""
"B<perfmonctl>() returns zero when the operation is successful. On error, "
"-1 is returned and I<errno> is set to indicate the cause of the error."
-msgstr ""
+msgstr "B<perfmonctl>() は操作が成功すると 0 を返す。 エラーの場合、 -1 が返り、 I<errno> にエラーの原因を示す値が設定される。"
#. type: Plain text
#: build/C/man2/perfmonctl.2:199
msgid "B<perfmonctl>() is available since Linux 2.4."
-msgstr ""
+msgstr "B<perfmonctl>() は Linux 2.4 以降で利用可能である。"
#. type: Plain text
#: build/C/man2/perfmonctl.2:202
msgid ""
"B<perfmonctl>() is Linux-specific and is available only on the IA-64 "
"architecture."
-msgstr ""
+msgstr "B<perfmonctl>() は Linux 固有で、 IA-64 アーキテクチャーでのみ利用できる。"
#. type: Plain text
#: build/C/man2/perfmonctl.2:207
#. type: Plain text
#: build/C/man2/perfmonctl.2:209
msgid "The perfmon2 interface specification"
-msgstr ""
+msgstr "perfmon2 インターフェース仕様"
#. type: TH
#: build/C/man2/personality.2:32
#: build/C/man2/process_vm_readv.2:54
msgid ""
"Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
-msgstr ""
+msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7) 参照):"
#. type: Plain text
#: build/C/man2/process_vm_readv.2:58
"process (\"the local process\") and the process identified by I<pid> (\"the "
"remote process\"). The data moves directly between the address spaces of "
"the two processes, without passing through kernel space."
-msgstr ""
+msgstr "これらのシステムコールは、 呼び出し元プロセス (「ローカルプロセス」) と I<pid> で指定されるプロセス (「リモートプロセス」) のアドレス空間間でデータを転送する。 データの移動は、 カーネル空間を経由することなく、 2 つのプロセスのアドレス空間間で直接行われる。"
#. type: Plain text
#: build/C/man2/process_vm_readv.2:98
"locations specified by I<local_iov> and I<liovcnt>: I<local_iov> is a "
"pointer to an array describing address ranges in the calling process, and "
"I<liovcnt> specifies the number of elements in I<local_iov>."
-msgstr ""
+msgstr "B<process_vm_readv>() システムコールは、 リモートプロセスからローカルプロセスへデータを転送する。 転送対象のデータは I<remote_iov> と I<riovcnt> で指定される。 I<remote_iov> はプロセス I<pid> におけるアドレス範囲を指定する配列へのポインターで、 I<riovcnt> は I<remote_iov> の要素数を指定する。 データは I<local_iov> と I<liovcnt> で指定された場所に転送される。 I<local_iov> は呼び出し元プロセスにおけるアドレス範囲を指定する配列で、 I<liovcnt> は I<local_iov> の要素数を指定する。"
#. type: Plain text
#: build/C/man2/process_vm_readv.2:112
"remote process. Other than the direction of the transfer, the arguments "
"I<liovcnt>, I<local_iov>, I<riovcnt>, and I<remote_iov> have the same "
"meaning as for B<process_vm_readv>()."
-msgstr ""
+msgstr "B<process_vm_writev>() システムコールは B<process_vm_readv>() の逆で、 ローカルプロセスからリモートプロセスにデータを転送する。 転送の方向が違う以外は、 引き数 I<liovcnt>, I<local_iov>, I<riovcnt>, I<remote_iov> は B<process_vm_readv>() と同じ意味を持つ。"
#. type: Plain text
#: build/C/man2/process_vm_readv.2:122
"B<process_vm_readv>() completely fills I<local_iov[0]> before proceeding to "
"I<local_iov[1]>, and so on. Likewise, I<remote_iov[0]> is completely read "
"before proceeding to I<remote_iov[1]>, and so on."
-msgstr ""
-"バッファーは配列の順序で処理される。これは、 B<process_vm_readv>() が\n"
-"I<local_iov>[0] が完全に一杯になるまでデータを詰めてから、\n"
-"I<local_iov>[1] に進むといったことを意味する。同様に、\n"
-"I<remote_iov>[0] を完全に読み出してから I<remote_iov>[1] に進み、\n"
-"以降も同様である。"
+msgstr "バッファーは配列の順序で処理される。 つまり、 B<process_vm_readv>() は I<local_iov>[0] が一杯になるまでデータを詰めてから、 I<local_iov>[1] に進むことを意味する。 同様に、 I<remote_iov>[0] を全部読み出してから I<remote_iov>[1] に進み、 以降も同様である。"
#. type: Plain text
#: build/C/man2/process_vm_readv.2:156
"Similarly, B<process_vm_writev>() writes out the entire contents of "
"I<local_iov[0]> before proceeding to I<local_iov[1]>, and it completely "
"fills I<remote_iov[0]> before proceeding to I<remote_iov[1]>."
-msgstr ""
+msgstr "同様に、 B<process_vm_writev>() は I<local_iov[0]> の内容を全部読み出してから I<local_iov[1]> に進み、 書き込み先でも I<remote_iov[0]> が一杯になってから I<remote_iov[1]> に進む。"
#. type: Plain text
#: build/C/man2/process_vm_readv.2:164
"The lengths of I<remote_iov[i].iov_len> and I<local_iov[i].iov_len> do not "
"have to be the same. Thus, it is possible to split a single local buffer "
"into multiple remote buffers, or vice versa."
-msgstr ""
+msgstr "長さ I<remote_iov[i].iov_len> と I<local_iov[i].iov_len> は同じである必要はない。 したがって、 ローカル側で 1 つのバッファーのデータがリモート側で複数のバッファーに分割されることがあるし、 その逆も起こりえる。"
#. type: Plain text
#: build/C/man2/process_vm_readv.2:168
"The values specified in the I<liovcnt> and I<riovcnt> arguments must be less "
"than or equal to B<IOV_MAX> (defined in I<E<lt>limits.hE<gt>> or accessible "
"via the call I<sysconf(_SC_IOV_MAX)>)."
-msgstr ""
+msgstr "I<liovcnt> と I<riovcnt> で指定される値は B<IOV_MAX> 以下でなければならない (B<IOV_MAX> は I<E<lt>limits.hE<gt>> で定義されており、 I<sysconf(_SC_IOV_MAX)> の呼び出しでも入手できる)。"
#. type: Plain text
#: build/C/man2/process_vm_readv.2:191
"transfers. If the counts are too big, or I<local_iov> is invalid, or the "
"addresses refer to regions that are inaccessible to the local process, none "
"of the vectors will be processed and an error will be returned immediately."
-msgstr ""
+msgstr "要素数引き数と I<local_iov> のチェックは、 すべてのデータ転送に先立って行われる。 要素数が大きすぎる場合や I<local_iov> が無効な場合、 アドレスがローカルプロセスがアクセスできない領域を参照している場合は、 配列のどの要素も処理されず、 すぐにエラーが返される。"
#. type: Plain text
#: build/C/man2/process_vm_readv.2:211
"entry goes up to the page boundary, while the second starts on the next page "
"boundary.)"
msgstr ""
+"ただし、 これらのシステムコールは、 実際に読み出し/書き込みを行う直前までリモートプロセスのメモリー領域のチェックを行わない点に注意すること。 結果として、 I<remote_iov> の要素の一つがリモートプロセスで無効なメモリー領域を参照している場合、 部分的な読み出し/書き込み (「返り値」の節を参照) が行われることになる。 これ以降は読み出し/書き込みは行われない。 リモートプロセスから長さ不明のデータ (例えば NULL 終端された C 文字列) を読み出す際で、 リモート側の一つの I<iovec> 要素が複数のメモリーページ (通常は 4KiB) にまたがらないようにしている場合は、 この点に注意が必要である。\n"
+"(リモートからの読み出しを 2 つの I<remote_iov> 要素に分割し、 1 つの I<local_iov> 要素への書き込みにマージすればよい。 最初の読み出しでページ境界まで読み出し、 次の読み出しを次のページ境界から行う。)"
#. type: Plain text
#: build/C/man2/process_vm_readv.2:225
"group-ID of the remote process must match the real group ID of the caller. "
"(The permission required is exactly the same as that required to perform a "
"B<ptrace>(2) B<PTRACE_ATTACH> on the remote process.)"
-msgstr ""
+msgstr "他のプロセスからの読み出しや他のプロセスへの書き込みを行うには、 呼び出し元がケーパビリティ B<CAP_SYS_PTRACE> を持っていなければならない、もしくは、 リモートプロセスの実ユーザー ID、 実効ユーザー ID、 保存 set-user-ID が呼び出し元の実ユーザー ID と一致し、 かつリモートプロセスの実グループ ID、 実効グループ ID、 保存 set-group-ID が呼び出し元の実グループ ID と一致していなければならない。 (ここで必要なアクセス許可は、 リモートプロセスに対して B<ptrace>(2) の B<PTRACE_ATTACH> を実行するのに必要な許可と全く同じである。)"
#. type: Plain text
#: build/C/man2/process_vm_readv.2:241
"I<iovec> elements. These system calls won't perform a partial transfer that "
"splits a single I<iovec> element.) The caller should check the return value "
"to determine whether a partial read/write occurred."
-msgstr ""
+msgstr "成功すると、 B<process_vm_readv>() は読み出したバイト数を返し、 B<process_vm_writev>() は書き込んだバイト数を返す。 この返り値は、 読み出し/書き込みが部分的に行われた場合には、 要求された総バイト数よりも小さくなることがある (部分的な転送は I<iovec> 要素単位に行われ、 これらのシステムコールが一つの I<iovec> 要素の一部だけが転送されることはない)。 呼び出し元は返り値を検査して、 部分的な読み出し/書き込みが起こったかどうかを判定できる。"
#. type: Plain text
#: build/C/man2/process_vm_readv.2:245
msgid ""
"The sum of the I<iov_len> values of either I<local_iov> or I<remote_iov> "
"overflows a I<ssize_t> value."
-msgstr ""
+msgstr "I<local_iov> か I<remote_iov> のいずれかの I<iov_len> の合計値が I<ssize_t> で表現できる値を超えている。"
#. type: Plain text
#: build/C/man2/process_vm_readv.2:261
msgid ""
"The memory described by I<local_iov> is outside the caller's accessible "
"address space."
-msgstr ""
-"I<local_iov> が示すメモリーが呼び出し側がアクセス可能な\n"
-"アドレス空間の外にある。"
+msgstr "I<local_iov> で指定されたメモリーが呼び出し元がアクセス可能なアドレス空間の外にある。"
#. type: Plain text
#: build/C/man2/process_vm_readv.2:278
msgid ""
"The memory described by I<remote_iov> is outside the accessible address "
"space of the process I<pid>."
-msgstr ""
+msgstr "I<remote_iov> で指定されたメモリーがプロセス I<pid> がアクセス可能なアドレス空間の外にある。"
#. type: Plain text
#: build/C/man2/process_vm_readv.2:283
msgid ""
"Could not allocate memory for internal copies of the I<iovec> structures."
-msgstr ""
+msgstr "I<iovec> 構造体の内部コピーのためのメモリーを割り当てできなかった。"
#. type: Plain text
#: build/C/man2/process_vm_readv.2:287
msgid ""
"The data transfers performed by B<process_vm_readv>() and "
"B<process_vm_writev>() are not guaranteed to be atomic in any way."
-msgstr ""
+msgstr "B<process_vm_readv>() と B<process_vm_writev>() により実行されるデータ転送をどのように行ったとしても、 これらがアトミックに行われる保証はない。"
#. Original user is MPI, http://www.mcs.anl.gov/research/projects/mpi/
#. See also some benchmarks at http://lwn.net/Articles/405284/
"double copy that would be required when using, for example, shared memory or "
"pipes)."
msgstr ""
+"これらのシステムコールは、 (共有メモリーやパイプなどを使った場合に必要となる 2 回のコピーではなく)\n"
+"1 回のコピー処理でメッセージの交換を許すことで、 高速なメッセージ送信をできるようにするために設計された。"
#. type: Plain text
#: build/C/man2/process_vm_readv.2:319
"The following code sample demonstrates the use of B<process_vm_readv>(). It "
"reads 20 bytes at the address 0x10000 from the process with PID 10 and "
"writes the first 10 bytes into I<buf1> and the second 10 bytes into I<buf2>."
-msgstr ""
+msgstr "以下のサンプルコードは B<process_vm_readv>() の使用例を示すものである。 このコードは PID 10 のプロセスのアドレス 0x10000 から 20 バイトを読み取り、 最初の 10 バイトを I<buf1> に、 残りの 10 バイトを I<buf2> に書き込む。"
#. type: Plain text
#: build/C/man2/process_vm_readv.2:322
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2015-01-23 22:24+0900\n"
-"PO-Revision-Date: 2015-01-25 07:20+0900\n"
+"PO-Revision-Date: 2015-01-27 03:42+0900\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
msgid ""
"malloc_get_state, malloc_set_state - record and restore state of malloc "
"implementation"
-msgstr ""
+msgstr "malloc_get_state, malloc_set_state - malloc 実装の状態を保存/復元する"
#. type: Plain text
#: build/C/man3/malloc_get_state.3:31 build/C/man3/malloc_hook.3:18
"allocated via B<malloc>(3), and a pointer to that data structure is returned "
"as the function result. (It is the caller's responsibility to B<free>(3) "
"this memory.)"
-msgstr ""
+msgstr "B<malloc_get_state>() 関数は B<malloc>(3) 内部のすべての管理用変数を記録する (ただし、 ヒープの実際の内容と B<malloc_hook>(3) 関数ポインターの状態は記録されない)。 状態は B<malloc>(3) で動的に確保されたシステム依存の opaque な (内部構造は分からない) データ構造体に記録され、 関数の結果としてそのデータ構造体へのポインターが返される (このメモリーは呼び出し元が責任をもって B<free>(3) する必要がある)。"
#. type: Plain text
#: build/C/man3/malloc_get_state.3:61
"The B<malloc_set_state>() function restores the state of all B<malloc>(3) "
"internal bookkeeping variables to the values recorded in the opaque data "
"structure pointed to by I<state>."
-msgstr ""
+msgstr "B<malloc_set_state>() 関数は、 B<malloc>(3) 内部のすべての管理用変数を I<state> が指す opaque なデータ構造体から復元する。"
#. type: Plain text
#: build/C/man3/malloc_get_state.3:68
"On success, B<malloc_get_state>() returns a pointer to a newly allocated "
"opaque data structure. On error (for example, memory could not be allocated "
"for the data structure), B<malloc_get_state>() returns NULL."
-msgstr ""
+msgstr "成功すると、 B<malloc_get_state>() は新しく割り当てられたデータ構造体へのポインターを返す。 エラーの場合 (例えば、データ構造体に必要なメモリーが割り当てられなかったなど)、 B<malloc_get_state>() は NULL を返す。"
#. if(ms->magic != MALLOC_STATE_MAGIC) return -1;
#. /* Must fail if the major version is too high. */
"version of the data structure referred to by I<state> is a more recent "
"version than this implementation knows about, B<malloc_set_state>() returns "
"-2."
-msgstr ""
+msgstr "成功すると、 B<malloc_set_state>() は 0 を返す。 実装が I<state> が正しく作成されたデータ構造体を指していないと検出した場合、 B<malloc_set_state>() は -1 を返す。 I<state> が参照するデータ構造体のバージョンがこの実装が認識するバージョンよりも新しいと実装が検出した場合、 B<malloc_set_state>() は -2 を返す。"
#. type: Plain text
#: build/C/man3/malloc_get_state.3:88 build/C/man3/malloc_hook.3:82
"part of a shared library, and the heap contents are saved/restored via some "
"other method. This technique is used by GNU Emacs to implement its \"dumping"
"\" function."
-msgstr ""
+msgstr "これらの関数が役に立つのは、 この B<malloc>(3) の実装が共有ライブラリの一部として使用され、 ヒープの内容が何か他の方法で保存/復元される場合である。 この手法は GNU Emacs が「ダンプ」関数 (\"dumping\" function) を実装するのに使用されている。"
#. i.e., calls __malloc_check_init()
#. i.e., malloc checking is not already in use
"checking hooks if possible; if malloc checking was not in use in the "
"recorded state, but the caller has requested malloc checking, then the hooks "
"are reset to 0."
-msgstr ""
+msgstr "これらの関数がフック関数ポインターの保存と復元を行うことはない。 ただし、 2 つ例外がある。 B<malloc_get_state>() が呼び出された際に malloc チェック (B<mallopt>(3) 参照) が使用中の場合、 B<malloc_set_state>() は可能なら malloc チェックフックをリセットする。 また、 保存された状態の malloc チェックが使用中でないが、 呼び出し元が malloc チェックを要求していた場合、 フックは 0 にリセットされる。"
#. type: Plain text
#: build/C/man3/malloc_get_state.3:114
#. type: Plain text
#: build/C/man3/malloc_trim.3:29
msgid "malloc_trim - release free memory from the top of the heap"
-msgstr ""
+msgstr "malloc_trim - ヒープの一番上から未使用メモリーを解放する"
#. type: Plain text
#: build/C/man3/malloc_trim.3:33
msgid ""
"The B<malloc_trim>() function attempts to release free memory at the top of "
"the heap (by calling B<sbrk>(2) with a suitable argument)."
-msgstr ""
+msgstr "B<malloc_trim>() 関数は (適切な引き数で B<sbrk>(2) を呼び出して) ヒープの一番上の未使用メモリーの解放を試みる。"
#. type: Plain text
#: build/C/man3/malloc_trim.3:51
"nonzero argument can be used to maintain some trailing space at the top of "
"the heap in order to allow future allocations to be made without having to "
"extend the heap with B<sbrk>(2)."
-msgstr ""
+msgstr "I<pad> 引き数は、 ヒープの一番上から切り詰める際に残す未使用領域の量を指定する。 この引き数が 0 の場合、 ヒープの一番上の最小量のメモリーだけを維持できる (つまり 1 ページかそれ未満)。 0 以外の引き数を指定すると、 ヒープの一番上にある程度の量の未使用領域を残し、 将来の割り当てを B<sbrk>(2) でヒープを拡張せずに行えるようにできる。"
#. type: Plain text
#: build/C/man3/malloc_trim.3:56
msgid ""
"The B<malloc_trim>() function returns 1 if memory was actually released "
"back to the system, or 0 if it was not possible to release any memory."
-msgstr ""
+msgstr "B<malloc_trim>() 関数はメモリーが実際に解放されシステムに戻された場合に 1 を返し、 どのメモリーも解放できなかった場合は 0 を返す。"
#. .SH VERSIONS
#. Available already in glibc 2.0, possibly earlier
#. type: Plain text
#: build/C/man3/malloc_trim.3:60
msgid "No errors are defined."
-msgstr ""
+msgstr "エラーは定義されていない。"
#. type: Plain text
#: build/C/man3/malloc_trim.3:71
"This function is automatically called by B<free>(3) in certain "
"circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
"B<mallopt>(3)."
-msgstr ""
+msgstr "この関数は、 特定の状況では B<free>(3) により自動的に呼び出される。 B<mallopt>(3) の B<M_TOP_PAD> と B<M_TRIM_THRESHOLD> の議論を参照。"
#. type: Plain text
#: build/C/man3/malloc_trim.3:74
msgid ""
"This function cannot release free memory located at places other than the "
"top of the heap."
-msgstr ""
+msgstr "この関数は、 ヒープの一番上以外の場所にある未使用メモリーを解放することはできない。"
#. malloc/malloc.c::mTRIm():
#. return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
#. type: Plain text
#: build/C/man3/malloc_trim.3:78
msgid "This function releases only memory in the main arena."
-msgstr ""
+msgstr "この関数はメイン領域のメモリーだけを解放する。"
#. type: Plain text
#: build/C/man3/malloc_trim.3:82
--- /dev/null
+.\" Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
+.\" and Copyright (C) 2013 Michael Kerrisk <mtk.manpages@gmail.com>
+.\" Written by Ivana Varekova <varekova@redhat.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 PERFMONCTL 2 2013\-02\-13 Linux "Linux Programmer's Manual"
+.SH 名前
+perfmonctl \- IA\-64 の PMU (性能監視ユニット) のインターフェース
+.SH 書式
+.nf
+\fB#include <syscall.h>\fP
+\fB#include <perfmon.h>\fP
+.sp
+\fBlong perfmonctl(int \fP\fIfd\fP\fB, int \fP\fIcmd\fP\fB, void *\fP\fIarg\fP\fB, int \fP\fInarg\fP\fB);\fP
+.fi
+\fI注\fP: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節を参照。
+.SH 説明
+IA\-64 固有の \fBperfmonctl\fP() システムコールは PMU (性能監視ユニット; performance monitoring
+unit) へのインターフェースを提供する。 PMU は PMD (performance monitoring data) レジスターと PMC
+(performance monitoring control) レジスターで構成され、 ハードウェアの統計を収集する。
+
+\fBperfmonctl\fP() は、 操作 \fIcmd\fP を \fIarg\fP で指定された入力引き数で行う。 引き数の数は \fInarg\fP で規定される。
+\fIfd\fP 引き数は操作対象の perfmon コンテキストを指定する。
+
+\fIcmd\fP に指定できる値は以下のとおりである。
+.TP
+\fBPFM_CREATE_CONTEXT\fP
+.nf
+\fBperfmonctl(int \fP\fIfd\fP\fB, PFM_CREATE_CONTEXT, pfarg_context_t *\fP\fIctxt\fP\fB, 1);\fP
+.fi
+コンテキストを用意する。
+
+\fIfd\fP 引き数は無視される。 新しい perfmon コンテキストを \fIctxt\fP で指定した内容で作成し、 そのファイルディスクリプターを
+\fIctxt\->ctx_fd\fP で返す。
+
+ファイルディスクリプターはそれ以降の \fBperfmonctl\fP() の呼び出しで使用したり、 \fBread\fP(2) を使ってイベント通知
+(\fIpfm_msg_t\fP 型) を読み出したりするのに使用できる。 このファイルディスクリプターは \fBselect\fP(2), \fBpoll\fP(2),
+\fBepoll\fP(7) で状態監視 (ポーリング) することができる。
+
+コンテキストを破棄するには、 そのファイルディスクリプターに対して \fBclose\fP(2) を呼び出す。
+.TP
+\fBPFM_WRITE_PMCS\fP
+.\" pfm_write_pmcs()
+.nf
+\fBperfmonctl(int \fP\fIfd\fP\fB, PFM_WRITE_PMCS, pfarg_reg_t *\fP\fIpmcs\fP\fB, n);\fP
+.fi
+PMC レジスターを設定する。
+.TP
+\fBPFM_WRITE_PMDS\fP
+.nf
+\fBperfmonctl(int \fP\fIfd\fP\fB, PFM_WRITE_PMDS, pfarg_reg_t *\fP\fIpmds\fP\fB, n);\fP
+.fi
+.\" pfm_write_pmds()
+PMD レジスターを設定する。
+.TP
+\fBPFM_READ_PMDS\fP
+.\" pfm_read_pmds()
+.nf
+\fBperfmonctl(int \fP\fIfd\fP\fB, PFM_READ_PMDS, pfarg_reg_t *\fP\fIpmds\fP\fB, n);\fP
+.fi
+PMD レジスターを読み出す。
+.TP
+\fBPFM_START\fP
+.\" pfm_start()
+.nf
+.\" .BI "perfmonctl(int " fd ", PFM_START, arg, 1);
+\fBperfmonctl(int \fP\fIfd\fP\fB, PFM_START, NULL, 0);\fP
+.fi
+監視を開始する。
+.TP
+\fBPFM_STOP\fP
+.\" pfm_stop()
+.nf
+\fBperfmonctl(int \fP\fIfd\fP\fB, PFM_STOP, NULL, 0);\fP
+.fi
+監視を停止する。
+.TP
+\fBPFM_LOAD_CONTEXT\fP
+.\" pfm_context_load()
+.nf
+\fBperfmonctl(int \fP\fIfd\fP\fB, PFM_LOAD_CONTEXT, pfarg_load_t *\fP\fIlargs\fP\fB, 1);\fP
+.fi
+指定したコンテキストをスレッドに接続する。
+.TP
+\fBPFM_UNLOAD_CONTEXT\fP
+.\" pfm_context_unload()
+.nf
+\fBperfmonctl(int \fP\fIfd\fP\fB, PFM_UNLOAD_CONTEXT, NULL, 0);\fP
+.fi
+指定したコンテキストをスレッドが切り離す。
+.TP
+\fBPFM_RESTART\fP
+.\" pfm_restart()
+.nf
+\fBperfmonctl(int \fP\fIfd\fP\fB, PFM_RESTART, NULL, 0);\fP
+.fi
+オーバーフロー通知を受信した後、 監視を再開する。
+.TP
+\fBPFM_GET_FEATURES\fP
+.\" pfm_get_features()
+.nf
+\fBperfmonctl(int \fP\fIfd\fP\fB, PFM_GET_FEARURES, pfarg_features_t *\fP\fIarg\fP\fB, 1);\fP
+.fi
+.TP
+\fBPFM_DEBUG\fP
+.\" pfm_debug()
+.nf
+\fBperfmonctl(int \fP\fIfd\fP\fB, PFM_DEBUG, \fP\fIval\fP\fB, 0);\fP
+.fi
+\fIval\fP が 0 以外の場合、デバッグモードを有効にする。 そうでない場合、 無効にする。
+.TP
+\fBPFM_GET_PMC_RESET_VAL\fP
+.\" pfm_get_pmc_reset()
+.nf
+\fBperfmonctl(int \fP\fIfd\fP\fB, PFM_GET_PMC_RESET_VAL, pfarg_reg_t * \fP\fIreq\fP\fB, n);\fP
+.fi
+.\"
+.\"
+.\" .TP
+.\" .B PFM_CREATE_EVTSETS
+.\"
+.\" create or modify event sets
+.\" .nf
+.\" .BI "perfmonctl(int " fd ", PFM_CREATE_EVTSETS, pfarg_setdesc_t *desc , n);
+.\" .fi
+.\" .TP
+.\" .B PFM_DELETE_EVTSETS
+.\" delete event sets
+.\" .nf
+.\" .BI "perfmonctl(int " fd ", PFM_DELETE_EVTSET, pfarg_setdesc_t *desc , n);
+.\" .fi
+.\" .TP
+.\" .B PFM_GETINFO_EVTSETS
+.\" get information about event sets
+.\" .nf
+.\" .BI "perfmonctl(int " fd ", PFM_GETINFO_EVTSETS, pfarg_setinfo_t *info, n);
+.\" .fi
+PMC レジスターをデフォルト値にリセットする。
+.SH 返り値
+\fBperfmonctl\fP() は操作が成功すると 0 を返す。 エラーの場合、 \-1 が返り、 \fIerrno\fP にエラーの原因を示す値が設定される。
+.SH バージョン
+\fBperfmonctl\fP() は Linux 2.4 以降で利用可能である。
+.SH 準拠
+\fBperfmonctl\fP() は Linux 固有で、 IA\-64 アーキテクチャーでのみ利用できる。
+.SH 注意
+glibc はこのシステムコールに対するラッパー関数を提供していない。 \fBsyscall\fP(2) を使って呼び出すこと。
+.SH 関連項目
+\fBgprof\fP(1)
+
+perfmon2 インターフェース仕様
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.78 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。
--- /dev/null
+.\" Copyright (C) 2011 Christopher Yeoh <cyeoh@au1.ibm.com>
+.\" and Copyright (C) 2012 Mike Frysinger <vapier@gentoo.org>
+.\" and Copyright (C) 2012 Michael Kerrisk <mtk.man-pages@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
+.\"
+.\" Commit fcf634098c00dd9cd247447368495f0b79be12d1
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH PROCESS_VM_READV 2 2014\-08\-19 Linux "Linux Programmer's Manual"
+.SH 名前
+process_vm_readv, process_vm_writev \- プロセスのアドレス空間間でデータを転送する
+.SH 書式
+.nf
+\fB#include <sys/uio.h>\fP
+
+\fBssize_t process_vm_readv(pid_t \fP\fIpid\fP\fB,\fP
+\fB const struct iovec *\fP\fIlocal_iov\fP\fB,\fP
+\fB unsigned long \fP\fIliovcnt\fP\fB,\fP
+\fB const struct iovec *\fP\fIremote_iov\fP\fB,\fP
+\fB unsigned long \fP\fIriovcnt\fP\fB,\fP
+\fB unsigned long \fP\fIflags\fP\fB);\fP
+
+\fBssize_t process_vm_writev(pid_t \fP\fIpid\fP\fB,\fP
+\fB const struct iovec *\fP\fIlocal_iov\fP\fB,\fP
+\fB unsigned long \fP\fIliovcnt\fP\fB,\fP
+\fB const struct iovec *\fP\fIremote_iov\fP\fB,\fP
+\fB unsigned long \fP\fIriovcnt\fP\fB,\fP
+\fB unsigned long \fP\fIflags\fP\fB);\fP
+.fi
+.sp
+.in -4n
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照):
+.in
+.sp
+\fBprocess_vm_readv\fP(), \fBprocess_vm_writev\fP():
+.PD 0
+.ad l
+.RS 4
+\fB_GNU_SOURCE\fP
+.RE
+.ad
+.PD
+.fi
+.SH 説明
+これらのシステムコールは、 呼び出し元プロセス (「ローカルプロセス」) と \fIpid\fP で指定されるプロセス (「リモートプロセス」)
+のアドレス空間間でデータを転送する。 データの移動は、 カーネル空間を経由することなく、 2 つのプロセスのアドレス空間間で直接行われる。
+
+\fBprocess_vm_readv\fP() システムコールは、 リモートプロセスからローカルプロセスへデータを転送する。 転送対象のデータは
+\fIremote_iov\fP と \fIriovcnt\fP で指定される。 \fIremote_iov\fP はプロセス \fIpid\fP
+におけるアドレス範囲を指定する配列へのポインターで、 \fIriovcnt\fP は \fIremote_iov\fP の要素数を指定する。 データは
+\fIlocal_iov\fP と \fIliovcnt\fP で指定された場所に転送される。 \fIlocal_iov\fP
+は呼び出し元プロセスにおけるアドレス範囲を指定する配列で、 \fIliovcnt\fP は \fIlocal_iov\fP の要素数を指定する。
+
+\fBprocess_vm_writev\fP() システムコールは \fBprocess_vm_readv\fP() の逆で、
+ローカルプロセスからリモートプロセスにデータを転送する。 転送の方向が違う以外は、 引き数 \fIliovcnt\fP, \fIlocal_iov\fP,
+\fIriovcnt\fP, \fIremote_iov\fP は \fBprocess_vm_readv\fP() と同じ意味を持つ。
+
+引き数 \fIlocal_iov\fP と \fIremote_iov\fP は \fIiovec\fP 構造体の配列へのポイン
+タである。 \fIiovec\fP 構造体は \fI<sys/uio.h>\fP で以下のように定義
+されている:
+
+.in +4n
+.nf
+struct iovec {
+ void *iov_base; /* Starting address */
+ size_t iov_len; /* Number of bytes to transfer */
+};
+.fi
+.in
+
+バッファーは配列の順序で処理される。 つまり、 \fBprocess_vm_readv\fP() は \fIlocal_iov\fP[0]
+が一杯になるまでデータを詰めてから、 \fIlocal_iov\fP[1] に進むことを意味する。 同様に、 \fIremote_iov\fP[0]
+を全部読み出してから \fIremote_iov\fP[1] に進み、 以降も同様である。
+
+同様に、 \fBprocess_vm_writev\fP() は \fIlocal_iov[0]\fP の内容を全部読み出してから \fIlocal_iov[1]\fP
+に進み、 書き込み先でも \fIremote_iov[0]\fP が一杯になってから \fIremote_iov[1]\fP に進む。
+
+長さ \fIremote_iov[i].iov_len\fP と \fIlocal_iov[i].iov_len\fP は同じである必要はない。 したがって、
+ローカル側で 1 つのバッファーのデータがリモート側で複数のバッファーに分割されることがあるし、 その逆も起こりえる。
+
+\fIflags\fP 引き数は現在使用されておらず、 0 を設定しなければならない。
+
+.\" In time, glibc might provide a wrapper that works around this limit,
+.\" as is done for readv()/writev()
+\fIliovcnt\fP と \fIriovcnt\fP で指定される値は \fBIOV_MAX\fP 以下でなければならない (\fBIOV_MAX\fP は
+\fI<limits.h>\fP で定義されており、 \fIsysconf(_SC_IOV_MAX)\fP の呼び出しでも入手できる)。
+
+要素数引き数と \fIlocal_iov\fP のチェックは、 すべてのデータ転送に先立って行われる。 要素数が大きすぎる場合や \fIlocal_iov\fP
+が無効な場合、 アドレスがローカルプロセスがアクセスできない領域を参照している場合は、 配列のどの要素も処理されず、 すぐにエラーが返される。
+
+ただし、 これらのシステムコールは、 実際に読み出し/書き込みを行う直前までリモートプロセスのメモリー領域のチェックを行わない点に注意すること。
+結果として、 \fIremote_iov\fP の要素の一つがリモートプロセスで無効なメモリー領域を参照している場合、 部分的な読み出し/書き込み
+(「返り値」の節を参照) が行われることになる。 これ以降は読み出し/書き込みは行われない。 リモートプロセスから長さ不明のデータ (例えば NULL
+終端された C 文字列) を読み出す際で、 リモート側の一つの \fIiovec\fP 要素が複数のメモリーページ (通常は 4KiB)
+にまたがらないようにしている場合は、 この点に注意が必要である。
+(リモートからの読み出しを 2 つの \fIremote_iov\fP 要素に分割し、 1 つの \fIlocal_iov\fP
+要素への書き込みにマージすればよい。 最初の読み出しでページ境界まで読み出し、 次の読み出しを次のページ境界から行う。)
+
+他のプロセスからの読み出しや他のプロセスへの書き込みを行うには、 呼び出し元がケーパビリティ \fBCAP_SYS_PTRACE\fP
+を持っていなければならない、もしくは、 リモートプロセスの実ユーザー ID、 実効ユーザー ID、 保存 set\-user\-ID
+が呼び出し元の実ユーザー ID と一致し、 かつリモートプロセスの実グループ ID、 実効グループ ID、 保存 set\-group\-ID
+が呼び出し元の実グループ ID と一致していなければならない。 (ここで必要なアクセス許可は、 リモートプロセスに対して \fBptrace\fP(2) の
+\fBPTRACE_ATTACH\fP を実行するのに必要な許可と全く同じである。)
+.SH 返り値
+成功すると、 \fBprocess_vm_readv\fP() は読み出したバイト数を返し、 \fBprocess_vm_writev\fP()
+は書き込んだバイト数を返す。 この返り値は、 読み出し/書き込みが部分的に行われた場合には、 要求された総バイト数よりも小さくなることがある
+(部分的な転送は \fIiovec\fP 要素単位に行われ、 これらのシステムコールが一つの \fIiovec\fP 要素の一部だけが転送されることはない)。
+呼び出し元は返り値を検査して、 部分的な読み出し/書き込みが起こったかどうかを判定できる。
+
+エラーの場合は \-1 が返され、 \fIerrno\fP が適切に設定される。
+.SH エラー
+.TP
+\fBEINVAL\fP
+\fIlocal_iov\fP か \fIremote_iov\fP のいずれかの \fIiov_len\fP の合計値が \fIssize_t\fP
+で表現できる値を超えている。
+.TP
+\fBEINVAL\fP
+\fIflags\fP が 0 でない。
+.TP
+\fBEINVAL\fP
+\fIliovcnt\fP か \fIriovcnt\fP が大きすぎる。
+.TP
+\fBEFAULT\fP
+\fIlocal_iov\fP で指定されたメモリーが呼び出し元がアクセス可能なアドレス空間の外にある。
+.TP
+\fBEFAULT\fP
+\fIremote_iov\fP で指定されたメモリーがプロセス \fIpid\fP がアクセス可能なアドレス空間の外にある。
+.TP
+\fBENOMEM\fP
+\fIiovec\fP 構造体の内部コピーのためのメモリーを割り当てできなかった。
+.TP
+\fBEPERM\fP
+呼び出し側がプロセス \fIpid\fP のアドレス空間に対するアクセス許可を
+持っていない。
+.TP
+\fBESRCH\fP
+ID が \fIpid\fP のプロセスが存在しない。
+.SH バージョン
+これらのシステムコールは Linux 3.2 で追加された。ライブラリによる
+サポートは glibc バージョン 2.15 以降で提供されている。
+.SH 準拠
+これらのシステムコールは非標準で Linux による拡張である。
+.SH 注意
+\fBprocess_vm_readv\fP() と \fBprocess_vm_writev\fP() により実行されるデータ転送をどのように行ったとしても、
+これらがアトミックに行われる保証はない。
+
+.\" Original user is MPI, http://www.mcs.anl.gov/research/projects/mpi/
+.\" See also some benchmarks at http://lwn.net/Articles/405284/
+.\" and http://marc.info/?l=linux-mm&m=130105930902915&w=2
+これらのシステムコールは、 (共有メモリーやパイプなどを使った場合に必要となる 2 回のコピーではなく)
+1 回のコピー処理でメッセージの交換を許すことで、 高速なメッセージ送信をできるようにするために設計された。
+.SH 例
+以下のサンプルコードは \fBprocess_vm_readv\fP() の使用例を示すものである。 このコードは PID 10 のプロセスのアドレス
+0x10000 から 20 バイトを読み取り、 最初の 10 バイトを \fIbuf1\fP に、 残りの 10 バイトを \fIbuf2\fP に書き込む。
+.sp
+.nf
+#include <sys/uio.h>
+
+int
+main(void)
+{
+ struct iovec local[2];
+ struct iovec remote[1];
+ char buf1[10];
+ char buf2[10];
+ ssize_t nread;
+ pid_t pid = 10; /* PID of remote process */
+
+ local[0].iov_base = buf1;
+ local[0].iov_len = 10;
+ local[1].iov_base = buf2;
+ local[1].iov_len = 10;
+ remote[0].iov_base = (void *) 0x10000;
+ remote[0].iov_len = 20;
+
+ nread = process_vm_readv(pid, local, 2, remote, 1, 0);
+ if (nread != 20)
+ return 1;
+ else
+ return 0;
+}
+.fi
+.SH 関連項目
+\fBreadv\fP(2), \fBwritev\fP(2)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.78 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。
--- /dev/null
+.\" 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 MALLOC_GET_STATE 3 2014\-06\-13 GNU "Linux Programmer's Manual"
+.SH 名前
+malloc_get_state, malloc_set_state \- malloc 実装の状態を保存/復元する
+.SH 書式
+.nf
+\fB#include <malloc.h>\fP
+.sp
+\fBvoid* malloc_get_state(void);\fP
+
+\fBint malloc_set_state(void *\fP\fIstate\fP\fB);\fP
+.fi
+.SH 説明
+\fBmalloc_get_state\fP() 関数は \fBmalloc\fP(3) 内部のすべての管理用変数を記録する (ただし、 ヒープの実際の内容と
+\fBmalloc_hook\fP(3) 関数ポインターの状態は記録されない)。 状態は \fBmalloc\fP(3) で動的に確保されたシステム依存の
+opaque な (内部構造は分からない) データ構造体に記録され、 関数の結果としてそのデータ構造体へのポインターが返される
+(このメモリーは呼び出し元が責任をもって \fBfree\fP(3) する必要がある)。
+
+\fBmalloc_set_state\fP() 関数は、 \fBmalloc\fP(3) 内部のすべての管理用変数を \fIstate\fP が指す opaque
+なデータ構造体から復元する。
+.SH 返り値
+成功すると、 \fBmalloc_get_state\fP() は新しく割り当てられたデータ構造体へのポインターを返す。 エラーの場合
+(例えば、データ構造体に必要なメモリーが割り当てられなかったなど)、 \fBmalloc_get_state\fP() は NULL を返す。
+
+.\" if(ms->magic != MALLOC_STATE_MAGIC) return -1;
+.\" /* Must fail if the major version is too high. */
+.\" if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
+成功すると、 \fBmalloc_set_state\fP() は 0 を返す。 実装が \fIstate\fP
+が正しく作成されたデータ構造体を指していないと検出した場合、 \fBmalloc_set_state\fP() は \-1 を返す。 \fIstate\fP
+が参照するデータ構造体のバージョンがこの実装が認識するバージョンよりも新しいと実装が検出した場合、 \fBmalloc_set_state\fP() は \-2
+を返す。
+.SH 準拠
+これらの関数は GNU による拡張である。
+.SH 注意
+これらの関数が役に立つのは、 この \fBmalloc\fP(3) の実装が共有ライブラリの一部として使用され、
+ヒープの内容が何か他の方法で保存/復元される場合である。 この手法は GNU Emacs が「ダンプ」関数 ("dumping" function)
+を実装するのに使用されている。
+
+.\" i.e., calls __malloc_check_init()
+.\" i.e., malloc checking is not already in use
+.\" and the caller requested malloc checking
+これらの関数がフック関数ポインターの保存と復元を行うことはない。 ただし、 2 つ例外がある。 \fBmalloc_get_state\fP()
+が呼び出された際に malloc チェック (\fBmallopt\fP(3) 参照) が使用中の場合、 \fBmalloc_set_state\fP()
+は可能なら malloc チェックフックをリセットする。 また、 保存された状態の malloc チェックが使用中でないが、 呼び出し元が malloc
+チェックを要求していた場合、 フックは 0 にリセットされる。
+.SH 関連項目
+\fBmalloc\fP(3), \fBmallopt\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.78 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。
--- /dev/null
+.\" 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 MALLOC_TRIM 3 2014\-05\-28 Linux "Linux Programmer's Manual"
+.SH 名前
+malloc_trim \- ヒープの一番上から未使用メモリーを解放する
+.SH 書式
+\fB#include <malloc.h>\fP
+
+\fBint malloc_trim(size_t \fP\fIpad\fP\fB);\fP
+.SH 説明
+\fBmalloc_trim\fP() 関数は (適切な引き数で \fBsbrk\fP(2) を呼び出して) ヒープの一番上の未使用メモリーの解放を試みる。
+
+\fIpad\fP 引き数は、 ヒープの一番上から切り詰める際に残す未使用領域の量を指定する。 この引き数が 0 の場合、
+ヒープの一番上の最小量のメモリーだけを維持できる (つまり 1 ページかそれ未満)。 0 以外の引き数を指定すると、
+ヒープの一番上にある程度の量の未使用領域を残し、 将来の割り当てを \fBsbrk\fP(2) でヒープを拡張せずに行えるようにできる。
+.SH 返り値
+\fBmalloc_trim\fP() 関数はメモリーが実際に解放されシステムに戻された場合に 1 を返し、 どのメモリーも解放できなかった場合は 0
+を返す。
+.SH エラー
+.\" .SH VERSIONS
+.\" Available already in glibc 2.0, possibly earlier
+エラーは定義されていない。
+.SH 準拠
+この関数は GNU による拡張である。
+.SH 注意
+この関数は、 特定の状況では \fBfree\fP(3) により自動的に呼び出される。 \fBmallopt\fP(3) の \fBM_TOP_PAD\fP と
+\fBM_TRIM_THRESHOLD\fP の議論を参照。
+
+この関数は、 ヒープの一番上以外の場所にある未使用メモリーを解放することはできない。
+
+.\" malloc/malloc.c::mTRIm():
+.\" return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
+この関数はメイン領域のメモリーだけを解放する。
+.SH 関連項目
+\fBsbrk\fP(2), \fBmalloc\fP(3), \fBmallopt\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.78 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。
get_robust_list.2,23,14,37
getunwind.2,19,13,32
perf_event_open.2,336,449,785
-perfmonctl.2,42,23,65
-process_vm_readv.2,47,17,64
ptrace.2,130,166,296
quotactl.2,55,47,102
# pagename,#complete,#remaining,#all
mallinfo.3,48,17,65
-malloc_get_state.3,18,7,25
-malloc_trim.3,18,8,26
mallopt.3,60,50,110
mcheck.3,29,25,54
mtrace.3,26,11,37
○:LDP man-pages:3.78:2003/07/14:pciconfig_read:2:2015/01/24::ysato444@yahoo.co.jp:Yuichi SATO:
@:LDP man-pages:3.78:2003/07/14:pciconfig_write:2:pciconfig_read:2:
×:LDP man-pages:3.78:2015/01/10:perf_event_open:2:::::
-×:LDP man-pages:3.78:2013/02/13:perfmonctl:2:::::
+○:LDP man-pages:3.78:2013/02/13:perfmonctl:2:2015/01/27::amotoki@gmail.com:Akihiro Motoki:
○:LDP man-pages:3.78:2014/04/15:personality:2:2015/01/24::argrath@ub32.org:Kentaro Shirakata:
@:LDP man-pages:3.78:2013/02/12:phys:2:unimplemented:2:
○:LDP man-pages:3.78:2014/07/08:pipe:2:2015/01/24::amotoki@gmail.com:Akihiro Motoki:
@:LDP man-pages:3.78:2013/06/21:pread64:2:pread:2:
@:LDP man-pages:3.78:2015/01/22:preadv:2:readv:2:
@:LDP man-pages:3.78:2015/01/22:prlimit:2:getrlimit:2:
-×:LDP man-pages:3.78:2014/08/19:process_vm_readv:2:::::
-※:LDP man-pages:3.78:2014/08/19:process_vm_writev:2:process_vm_readv:2:
+○:LDP man-pages:3.78:2014/08/19:process_vm_readv:2:2015/01/27::amotoki@gmail.com:Akihiro Motoki:
+@:LDP man-pages:3.78:2014/08/19:process_vm_writev:2:process_vm_readv:2:
@:LDP man-pages:3.78:2013/02/12:prof:2:unimplemented:2:
@:LDP man-pages:3.78:2015/01/22:pselect:2:select:2:
@:LDP man-pages:3.78:2015/01/22:pselect6:2:select:2:
○: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: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:::::
+○: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:
○:LDP man-pages:3.78:2015/01/22:malloc_info:3:2015/01/24::amotoki@gmail.com:Akihiro Motoki:
-※:LDP man-pages:3.78:2014/06/13:malloc_set_state:3:malloc_get_state:3:
+@:LDP man-pages:3.78:2014/06/13:malloc_set_state:3:malloc_get_state:3:
○:LDP man-pages:3.78:2012/05/06:malloc_stats:3:2015/01/24::amotoki@gmail.com:Akihiro Motoki:
-×:LDP man-pages:3.78:2014/05/28:malloc_trim:3:::::
+○:LDP man-pages:3.78:2014/05/28:malloc_trim:3:2015/01/27::amotoki@gmail.com:Akihiro Motoki:
○:LDP man-pages:3.78:2014/06/13:malloc_usable_size:3:2015/01/24::amotoki@gmail.com:Akihiro Motoki:
×:LDP man-pages:3.78:2014/07/08:mallopt:3:::::
○:LDP man-pages:3.78:2014/06/13:matherr:3:2015/01/24::amotoki@gmail.com:Akihiro Motoki:
<TR><TD>get_robust_list.2</TD><TD>14/37</TD><TD>62.16</TD></TR>
<TR><TD>getunwind.2</TD><TD>13/32</TD><TD>59.38</TD></TR>
<TR><TD>perf_event_open.2</TD><TD>449/785</TD><TD>42.80</TD></TR>
-<TR><TD>perfmonctl.2</TD><TD>23/65</TD><TD>64.62</TD></TR>
-<TR class="over70"><TD>process_vm_readv.2</TD><TD>17/64</TD><TD>73.44</TD></TR>
<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 class="over70"><TD>malloc_get_state.3</TD><TD>7/25</TD><TD>72.00</TD></TR>
-<TR><TD>malloc_trim.3</TD><TD>8/26</TD><TD>69.23</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>
<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 38 pages</TD></TR>
+<TR><TD COLSPAN=3>Total 34 pages</TD></TR>
</TABLE>
</BODY></HTML>