OSDN Git Service

(split) LDP: Translate several number of pages
[linuxjm/LDP_man-pages.git] / draft / man2 / mmap.2
index e58589a..70241ae 100644 (file)
@@ -1,8 +1,7 @@
-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\"
 .\" Copyright (C) 1996 Andries Brouwer <aeb@cwi.nl>
 .\" and Copyright (C) 2006, 2007 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.
@@ -22,6 +21,7 @@
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
 .\" Modified 1997-01-31 by Eric S. Raymond <esr@thyrsus.com>
 .\" Modified 2000-03-25 by Jim Van Zandt <jrv@vanzandt.mv.com>
 .\" 2007-07-10, mtk, Added an example program.
 .\" 2008-11-18, mtk, document MAP_STACK
 .\"
-.\" Japanese Version Copyright (c) 1997-2000 SUTO, Mitsuaki and NAKANO Takeo
-.\"         all rights reserved.
-.\" Translated 1997-06-26, SUTO, Mitsuaki <suto@av.crl.sony.co.jp>
-.\" Updated & Modified 1999-03-01, NAKANO Takeo <nakano@apm.seikei.ac.jp>
-.\" Updated 2000-10-12, Nakano Takeo
-.\" Updated 2001-08-16, Nakano Takeo
-.\" Updated 2001-11-11, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
-.\" Updated 2002-08-13, Akihiro MOTOKI
-.\" Updated 2003-07- 2, Akihiro MOTOKI
-.\" Updated 2003-09-14, Akihiro MOTOKI
-.\" Updated & Modified 2004-12-28, Yuichi SATO <ysato444@yahoo.co.jp>
-.\" Updated 2005-09-06, Akihiro MOTOKI
-.\" Updated 2005-10-05, Akihiro MOTOKI
-.\" Updated 2006-07-23, Akihiro MOTOKI, LDP v2.36
-.\" Updated 2007-01-07, Akihiro MOTOKI, LDP v2.43
-.\" Updated 2007-05-04, Akihiro MOTOKI, LDP v2.46
-.\" Updated 2007-09-03, Akihiro MOTOKI, LDP v2.64
-.\" Updated 2008-08-05, Akihiro MOTOKI, LDP v3.05
-.\" Updated 2008-09-02, Akihiro MOTOKI, LDP v3.08
-.\" Updated 2008-12-24, Akihiro MOTOKI, LDP v3.15
-.\" Updated 2010-04-18, Akihiro MOTOKI, LDP v3.24
+.\"*******************************************************************
 .\"
-.\"WORD                file descriptor         ¥Õ¥¡¥¤¥ëµ­½Ò»Ò
+.\" This file was generated with po4a. Translate the source file.
 .\"
-.TH MMAP 2 2009-09-26 "Linux" "Linux Programmer's Manual"
-.\"O .SH NAME
-.\"O mmap, munmap \- map or unmap files or devices into memory
-.SH Ì¾Á°
-mmap, munmap \- ¥Õ¥¡¥¤¥ë¤ä¥Ç¥Ð¥¤¥¹¤ò¥á¥â¥ê¤Ë¥Þ¥Ã¥×/¥¢¥ó¥Þ¥Ã¥×¤¹¤ë
-.\"O .SH SYNOPSIS
-.SH ½ñ¼°
+.\"*******************************************************************
+.TH MMAP 2 2013\-04\-17 Linux "Linux Programmer's Manual"
+.SH 名前
+mmap, munmap \- ファイルやデバイスをメモリにマップ/アンマップする
+.SH 書式
 .nf
-.B #include <sys/mman.h>
+\fB#include <sys/mman.h>\fP
 .sp
-.BI "void *mmap(void *" addr ", size_t " length \
-", int " prot ", int " flags ,
-.BI "           int " fd ", off_t " offset );
-.BI "int munmap(void *" addr ", size_t " length );
+\fBvoid *mmap(void *\fP\fIaddr\fP\fB, size_t \fP\fIlength\fP\fB, int \fP\fIprot\fP\fB, int \fP\fIflags\fP\fB,\fP
+\fB           int \fP\fIfd\fP\fB, off_t \fP\fIoffset\fP\fB);\fP
+\fBint munmap(void *\fP\fIaddr\fP\fB, size_t \fP\fIlength\fP\fB);\fP
 .fi
-.\"O .SH DESCRIPTION
-.SH ÀâÌÀ
-.\"O .BR mmap ()
-.\"O creates a new mapping in the virtual address space of
-.\"O the calling process.
-.\"O The starting address for the new mapping is specified in
-.\"O .IR addr .
-.\"O The
-.\"O .I length
-.\"O argument specifies the length of the mapping.
-.BR mmap ()
-¤Ï¡¢¿·¤·¤¤¥Þ¥Ã¥Ô¥ó¥°¤ò¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î²¾ÁÛ¥¢¥É¥ì¥¹¶õ´Ö¤ËºîÀ®¤¹¤ë¡£
-¿·¤·¤¤¥Þ¥Ã¥Ô¥ó¥°¤Î³«»Ï¥¢¥É¥ì¥¹¤Ï
-.I addr
-¤Ç»ØÄꤵ¤ì¤ë¡£¥Þ¥Ã¥Ô¥ó¥°¤ÎŤµ¤Ï
-.I length
-°ú¤­¿ô¤Ç»ØÄꤵ¤ì¤ë¡£
 
-.\"O If
-.\"O .I addr
-.\"O is NULL,
-.\"O then the kernel chooses the address at which to create the mapping;
-.\"O this is the most portable method of creating a new mapping.
-.\"O If
-.\"O .I addr
-.\"O is not NULL,
-.\"O then the kernel takes it as a hint about where to place the mapping;
-.\"O on Linux, the mapping will be created at a nearby page boundary.
-.\"O .\" Before Linux 2.6.24, the address was rounded up to the next page
-.\"O .\" boundary; since 2.6.24, it is rounded down!
-.\"O The address of the new mapping is returned as the result of the call.
-.I addr
-¤¬ NULL ¤Î¾ì¹ç¡¢¥«¡¼¥Í¥ë¤¬¥Þ¥Ã¥Ô¥ó¥°¤òºîÀ®¤¹¤ë¥¢¥É¥ì¥¹¤òÁªÂò¤¹¤ë¡£
-¤³¤ÎÊýË¡¤ÏºÇ¤â°Ü¿¢À­¤Î¤¢¤ë¿·¤·¤¤¥Þ¥Ã¥Ô¥ó¥°¤ÎºîÀ®ÊýË¡¤Ç¤¢¤ë¡£
-.I addr
-¤¬ NULL ¤Ç¤Ê¤¤¾ì¹ç¡¢¥«¡¼¥Í¥ë¤Ï¥Þ¥Ã¥Ô¥ó¥°¤ò¤É¤³¤ËÇÛÃÖ¤¹¤ë¤«¤Î¥Ò¥ó¥È¤È¤·¤Æ
-.I addr
-¤ò»ÈÍѤ¹¤ë¡£Linux ¤Ç¤Ï¡¢¥Þ¥Ã¥Ô¥ó¥°¤Ï¤¹¤°¶á¤¯¤Î¥Ú¡¼¥¸¶­³¦¤ËºîÀ®¤µ¤ì¤ë¡£
-.\" Linux 2.6.24 ¤è¤êÁ°¤Ç¤Ï¡¢¥¢¥É¥ì¥¹¤Ï (¥¢¥É¥ì¥¹¤¬Â礭¤¯¤Ê¤ëÊý¸þ¤Ç)
-.\" ¤¹¤°¼¡¤Î¥Ú¡¼¥¸¶­³¦¤ËÀÚ¤ê¾å¤²¤é¤ì¤Æ¤¤¤¿¡£
-.\" Linux 2.6.24 °Ê¹ß¤Ç¤Ï¡¢Àڤ겼¤²¤é¤ì¤ë!
-¿·¤·¤¤¥Þ¥Ã¥Ô¥ó¥°¤Î¥¢¥É¥ì¥¹¤Ï¡¢¸Æ¤Ó½Ð¤·¤ÎÊÖ¤êÃͤȤ·¤ÆÊÖ¤µ¤ì¤ë¡£
+See NOTES for information on feature test macro requirements.
+.SH 説明
+\fBmmap\fP()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成する。 新しいマッピングの開始アドレスは \fIaddr\fP
+で指定される。マッピングの長さは \fIlength\fP 引き数で指定される。
+
+.\" Before Linux 2.6.24, the address was rounded up to the next page
+.\" boundary; since 2.6.24, it is rounded down!
+\fIaddr\fP が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 この方法は最も移植性のある新しいマッピングの作成方法である。
+\fIaddr\fP が NULL でない場合、カーネルはマッピングをどこに配置するかのヒントとして \fIaddr\fP を使用する。Linux
+では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピングのアドレスは、呼び出しの返り値として返される。
 
-.\"O The contents of a file mapping (as opposed to an anonymous mapping; see
-.\"O .B MAP_ANONYMOUS
-.\"O below), are initialized using
-.\"O .I length
-.\"O bytes starting at offset
-.\"O .I offset
-.\"O in the file (or other object) referred to by the file descriptor
-.\"O .IR fd .
-.\"O .I offset
-.\"O must be a multiple of the page size as returned by
-.\"O .IR sysconf(_SC_PAGE_SIZE) .
-¥Õ¥¡¥¤¥ë¥Þ¥Ã¥Ô¥ó¥°¤ÎÆâÍƤϡ¢
-¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿
-.I fd
-¤Ç»²¾È¤µ¤ì¤ë¥Õ¥¡¥¤¥ë (¤â¤·¤¯¤Ï¾¤Î¥ª¥Ö¥¸¥§¥¯¥È) ¤Î¥ª¥Õ¥»¥Ã¥È
-.I offset
-¤«¤é³«»Ï¤µ¤ì¤ë
-.I length
-¥Ð¥¤¥È¤Î¥Ç¡¼¥¿¤Ç½é´ü²½¤µ¤ì¤ë
-(¥Õ¥¡¥¤¥ë¥Þ¥Ã¥Ô¥ó¥°¤Ï̵̾¥Þ¥Ã¥Ô¥ó¥°¤ÎÈ¿Âиì¤Ç¤¢¤ë¡£
-.B MAP_ANONYMOUS
-¤ò»²¾È)¡£
-.I offset
-¤Ï
-.I sysconf(_SC_PAGE_SIZE)
-¤¬ÊÖ¤¹¥Ú¡¼¥¸¥µ¥¤¥º¤ÎÇÜ¿ô¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
+ファイルマッピングの内容は、 ファイルディスクリプタ \fIfd\fP で参照されるファイル (もしくは他のオブジェクト) のオフセット \fIoffset\fP
+から開始される \fIlength\fP バイトのデータで初期化される (ファイルマッピングは無名マッピングの反対語である。 \fBMAP_ANONYMOUS\fP
+を参照)。 \fIoffset\fP は \fIsysconf(_SC_PAGE_SIZE)\fP が返すページサイズの倍数でなければならない。
 .LP
-.\"O The
-.\"O .I prot
-.\"O argument describes the desired memory protection of the mapping
-.\"O (and must not conflict with the open mode of the file).
-.\"O It is either
-.\"O .B PROT_NONE
-.\"O or the bitwise OR of one or more of the following flags:
-°ú¤­¿ô
-.I prot
-¤Ë¤Ï¡¢¥Þ¥Ã¥Ô¥ó¥°¤Î¥á¥â¥êÊݸî¤ò¤É¤Î¤è¤¦¤Ë¹Ô¤Ê¤¦¤«¤ò»ØÄꤹ¤ë
-(¥Õ¥¡¥¤¥ë¤Î¥ª¡¼¥×¥ó¥â¡¼¥É¤ÈÌ·½â¤·¤Æ¤Ï¤¤¤±¤Ê¤¤)¡£
-.I prot
-¤Ë¤Ï¡¢
-.B PROT_NONE
-¤«¡¢°Ê²¼¤Î¥Õ¥é¥°¤ò¤Ò¤È¤Ä°Ê¾å¥Ó¥Ã¥ÈËè¤ÎÏÀÍýÏ (OR) ¤ò¤È¤Ã¤¿¤â¤Î¤ò
-»ØÄê¤Ç¤­¤ë¡£
-.TP 1.1i
-.B PROT_EXEC
-.\"O Pages may be executed.
-¥Ú¡¼¥¸¤Ï¼Â¹Ô²Äǽ¤Ç¤¢¤ë¡£
-.TP
-.B PROT_READ
-.\"O Pages may be read.
-¥Ú¡¼¥¸¤ÏÆɤ߹þ¤ß²Äǽ¤Ç¤¢¤ë¡£
-.TP
-.B PROT_WRITE
-.\"O Pages may be written.
-¥Ú¡¼¥¸¤Ë½ñ¤­¹þ¤ß²Äǽ¤Ç¤¢¤ë¡£
-.TP
-.B PROT_NONE
-.\"O Pages may not be accessed.
-¥Ú¡¼¥¸¤Ë¤Ï¥¢¥¯¥»¥¹¤Ç¤­¤Ê¤¤¡£
+引き数 \fIprot\fP には、マッピングのメモリ保護をどのように行なうかを指定する (ファイルのオープンモードと矛盾してはいけない)。 \fIprot\fP
+には、 \fBPROT_NONE\fP か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。
+.TP  1.1i
+\fBPROT_EXEC\fP
+ページは実行可能である。
+.TP 
+\fBPROT_READ\fP
+ページは読み込み可能である。
+.TP 
+\fBPROT_WRITE\fP
+ページに書き込み可能である。
+.TP 
+\fBPROT_NONE\fP
+ページにはアクセスできない。
 .LP
-.\"O The
-.\"O .I flags
-.\"O argument determines whether updates to the mapping
-.\"O are visible to other processes mapping the same region,
-.\"O and whether updates are carried through to the underlying file.
-.\"O This behavior is determined by including exactly one
-.\"O of the following values in
-.\"O .IR flags :
-.I flags
-°ú¤­¿ô¤Ë¤è¤ê¡¢¥Þ¥Ã¥Ô¥ó¥°¤ËÂФ¹¤ë¹¹¿·¤¬Æ±¤¸Îΰè¤ò¥Þ¥Ã¥Ô¥ó¥°¤·¤Æ¤¤¤ë
-¾¤Î¥×¥í¥»¥¹¤Ë¸«¤¨¤ë¤«¡¢¹¹¿·¤¬¥Þ¥Ã¥Ô¥ó¥°¸µ¤Î¥Õ¥¡¥¤¥ë¤òÄ̤¸¤Æ
-ÅÁ¤¨¤é¤ì¤ë¤«¡¢¤¬·èÄꤵ¤ì¤ë¡£¤³¤ÎÆ°ºî¤Ï¡¢°Ê²¼¤ÎÃͤΤ¤¤º¤ì¤«°ì¤Ä¤À¤±
-(Ê£¿ô¤Ï»ØÄê¤Ç¤­¤Ê¤¤) ¤ò
-.I flags
-¤Ë´Þ¤á¤ë¤³¤È¤Ç»ØÄꤹ¤ë¡£
-.TP 1.1i
-.B MAP_SHARED
-.\"O Share this mapping.
-.\"O Updates to the mapping are visible to other processes that map this file,
-.\"O and are carried through to the underlying file.
-.\"O The file may not actually be updated until
-.\"O .BR msync (2)
-.\"O or
-.\"O .BR munmap ()
-.\"O is called.
-¤³¤Î¥Þ¥Ã¥Ô¥ó¥°¤ò¶¦Í­¤¹¤ë¡£
-¥Þ¥Ã¥Ô¥ó¥°¤ËÂФ¹¤ë¹¹¿·¤Ï¤³¤Î¥Õ¥¡¥¤¥ë¤ò¥Þ¥Ã¥Ô¥ó¥°¤·¤Æ¤¤¤ë¾¤Î¥×¥í¥»¥¹
-¤«¤é¸«¤¨¤ë¡£¹¹¿·¤Ï¥Þ¥Ã¥Ô¥ó¥°¸µ¤Î¥Õ¥¡¥¤¥ë¤òÄ̤¸¤ÆÅÁ¤¨¤é¤ì¤ë¡£
-¤¿¤À¤·¡¢¥Õ¥¡¥¤¥ë¤Î¼ÂºÝ¤Î¹¹¿·¤Ï
-.BR msync (2)
-¤Þ¤¿¤Ï
-.BR munmap ()
-¤¬¸Æ¤Ð¤ì¤ë¤Þ¤Ç¹Ô¤ï¤ì¤Ê¤¤¤³¤È¤â¤¢¤ë¡£
-.TP
-.B MAP_PRIVATE
-.\"O Create a private copy-on-write mapping.
-.\"O Updates to the mapping are not visible to other processes
-.\"O mapping the same file, and are not carried through to
-.\"O the underlying file.
-.\"O It is unspecified whether changes made to the file after the
-.\"O .BR mmap ()
-.\"O call are visible in the mapped region.
-¥×¥é¥¤¥Ù¡¼¥È¤Ê copy-on-write (½ñ¤­¹þ¤ß»þ¥³¥Ô¡¼) ¥Þ¥Ã¥×¤òÀ¸À®¤¹¤ë¡£
-¥Þ¥Ã¥Ô¥ó¥°¤ËÂФ¹¤ë¹¹¿·¤ÏƱ¤¸¥Õ¥¡¥¤¥ë¤ò¥Þ¥Ã¥Ô¥ó¥°¤·¤Æ¤¤¤ë¾¤Î¥×¥í¥»¥¹
-¤Ë¤Ï¸«¤¨¤º¡¢¹¹¿·¤¬¥Þ¥Ã¥Ô¥ó¥°¸µ¤Î¥Õ¥¡¥¤¥ë¤òÄ̤¸¤ÆÅÁ¤¨¤é¤ì¤ë¤³¤È¤â¤Ê¤¤¡£
-.BR mmap ()
-¤Î¸Æ¤Ó½Ð¤·¸å¤Ë¥Þ¥Ã¥Ô¥ó¥°¸µ¤Î¥Õ¥¡¥¤¥ë¤ËÂФ·¤Æ¹Ô¤ï¤ì¤¿Êѹ¹¤¬¡¢
-¥Þ¥Ã¥×Îΰè¤ËÈ¿±Ç¤µ¤ì¤ë¤«¤É¤¦¤«¤Ïµ¬Äꤵ¤ì¤Æ¤¤¤Ê¤¤¡£
+\fIflags\fP 引き数により、マッピングに対する更新が同じ領域をマッピングしている 他のプロセスに見えるか、更新がマッピング元のファイルを通じて
+伝えられるか、が決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を \fIflags\fP に含めることで指定する。
+.TP  1.1i
+\fBMAP_SHARED\fP
+このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングしている他のプロセス
+から見える。更新はマッピング元のファイルを通じて伝えられる。 ただし、ファイルの実際の更新は \fBmsync\fP(2)  または \fBmunmap\fP()
+が呼ばれるまで行われないこともある。
+.TP 
+\fBMAP_PRIVATE\fP
+プライベートな copy\-on\-write (書き込み時コピー) マップを生成する。
+マッピングに対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新がマッピング元のファイルを通じて伝えられることもない。
+\fBmmap\fP()  の呼び出し後にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどうかは規定されていない。
 .LP
-.\"O Both of these flags are described in POSIX.1-2001.
-¾åµ­¤ÎÆó¤Ä¤Î¥Õ¥é¥°¤Ï POSIX.1-2001 ¤Çµ¬Äꤵ¤ì¤Æ¤¤¤ë¡£
+上記の二つのフラグは POSIX.1\-2001 で規定されている。
 
-.\"O In addition, zero or more of the following values can be ORed in
-.\"O .IR flags :
-¤µ¤é¤Ë¡¢°Ê²¼¤ÎÃͤΤ¦¤Á 0 ¸Ä°Ê¾å¤ò¥Ó¥Ã¥ÈËè¤ÎÏÀÍýÏ (OR) ¤Ç
-.I flags
-¤Ë»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
-.TP
-.\"O .BR MAP_32BIT " (since Linux 2.4.20, 2.6)"
-.BR MAP_32BIT " (Linux 2.4.20, 2.6 °Ê¹ß)"
-.\"O Put the mapping into the first 2 Gigabytes of the process address space.
-.\"O This flag is only supported on x86-64, for 64-bit programs.
-.\"O It was added to allow thread stacks to be allocated somewhere
-.\"O in the first 2GB of memory,
-.\"O so as to improve context-switch performance on some early
-.\"O 64-bit processors.
-.\"O .\" See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
-.\"O Modern x86-64 processors no longer have this performance problem,
-.\"O so use of this flag is not required on those systems.
-.\"O The
-.\"O .B MAP_32BIT
-.\"O flag is ignored when
-.\"O .B MAP_FIXED
-.\"O is set.
-¥Þ¥Ã¥Ô¥ó¥°¤ò¥×¥í¥»¥¹¤Î¥¢¥É¥ì¥¹¶õ´Ö¤ÎÀèƬ 2 ¥®¥¬¥Ð¥¤¥È°ÊÆâ¤ËÇÛÃÖ¤¹¤ë¡£
-¤³¤Î¥Õ¥é¥°¤¬¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë¤Î¤Ï x86-64 ¥¢¡¼¥­¥Æ¥¯¥Á¥ã¾å¤Î
-64 ¥Ó¥Ã¥È¥×¥í¥°¥é¥à¤Î¤ß¤Ç¤¢¤ë¡£
-¤³¤Î¥Õ¥é¥°¤¬Äɲ䵤줿¤Î¤Ï¡¢¥¹¥ì¥Ã¥É¤Î¥¹¥¿¥Ã¥¯¤ò¥á¥â¥ê¤ÎÀèƬ 2GB °ÊÆâ¤Î
-¤É¤³¤«¤Ë³ä¤êÅö¤Æ¤ë¤³¤È¤Ç¡¢½é´ü¤Î¤¤¤¯¤Ä¤«¤Î 64 ¥Ó¥Ã¥È¥×¥í¥»¥Ã¥µ¤Ë¤ª¤±¤ë
-¥³¥ó¥Æ¥­¥¹¥È¥¹¥¤¥Ã¥Á¤ÎÀ­Ç½ÌäÂê¤ò²þÁ±¤¹¤ë¤¿¤á¤Ç¤¢¤ë¡£
+さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で \fIflags\fP に指定することができる。
+.TP 
+\fBMAP_32BIT\fP (Linux 2.4.20, 2.6 以降)
 .\" See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
-ºÇ¶á¤Î x86-64 ¥×¥í¥»¥Ã¥µ¤Ç¤Ï¤³¤ÎÀ­Ç½ÌäÂê¤Ï¤â¤Ï¤ä¸ºß¤»¤º¡¢
-¤½¤Î¤è¤¦¤Ê¥·¥¹¥Æ¥à¤Ç¤Ï¤³¤Î¥Õ¥é¥°¤ò»ÈÍѤ¹¤ëɬÍפϤʤ¤¡£
-.B MAP_FIXED
-¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢
-.B MAP_32BIT
-¥Õ¥é¥°¤Ï̵»ë¤µ¤ì¤ë¡£
-.TP
-.B MAP_ANON
-.\"O Synonym for
-.\"O .BR MAP_ANONYMOUS .
-.\"O Deprecated.
-.B MAP_ANONYMOUS
-¤ÎƱµÁ¸ì¡£Èó¿ä¾©¡£
-.TP
-.B MAP_ANONYMOUS
-.\"O The mapping is not backed by any file;
-.\"O its contents are initialized to zero.
-.\"O The
-.\"O .I fd
-.\"O and
-.\"O .I offset
-.\"O arguments are ignored;
-.\"O however, some implementations require
-.\"O .I fd
-.\"O to be \-1 if
-.\"O .B MAP_ANONYMOUS
-.\"O (or
-.\"O .BR MAP_ANON )
-.\"O is specified,
-.\"O and portable applications should ensure this.
-.\"O The use of
-.\"O .B MAP_ANONYMOUS
-.\"O in conjunction with
-.\"O .B MAP_SHARED
-.\"O is only supported on Linux since kernel 2.4.
-¥Þ¥Ã¥Ô¥ó¥°¤Ï¤É¤Î¥Õ¥¡¥¤¥ë¤È¤â´ØÏ¢ÉÕ¤±¤µ¤ì¤Ê¤¤¡£
-¥Þ¥Ã¥Ô¥ó¥°¤ÎÆâÍƤϠ0 ¤Ç½é´ü²½¤µ¤ì¤ë¡£
-°ú¤­¿ô
-.I fd
-¤È
-.I offset
-¤Ï̵»ë¤µ¤ì¤ë¡£
-¤¿¤À¤·¡¢¼ÂÁõ¤Ë¤è¤Ã¤Æ¤Ï
-.B MAP_ANONYMOUS
-(¤â¤·¤¯¤Ï
-.BR MAP_ANON )
-¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¡¢
-.I fd
-¤ò \-1 ¤Ë¤¹¤ëɬÍפ¬¤¢¤ê¡¢
-°Ü¿¢À­¤¬É¬Íפʥ¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç¤Ïɬ¤º
-.I fd
-¤ò \-1 ¤Ë¤¹¤Ù¤­¤Ç¤¢¤ë¡£
-.B MAP_ANONYMOUS
-¤È
-.B MAP_SHARED
-¤òÁȤ߹ç¤ï¤»¤Æ¤ÎÍøÍѤÏ
-¥«¡¼¥Í¥ë 2.4 °Ê¹ß¤Î Linux ¤Ç¤Î¤ß¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë¡£
-.TP
-.B MAP_DENYWRITE
-.\"O This flag is ignored.
-.\"O .\" Introduced in 1.1.36, removed in 1.3.24.
-.\"O (Long ago, it signaled that attempts to write to the underlying file
-.\"O should fail with
-.\"O .B ETXTBUSY .
-.\"O But this was a source of denial-of-service attacks.)
-¤³¤Î¥Õ¥é¥°¤Ï̵»ë¤µ¤ì¤ë
-.\" 1.1.36 ¤ÇƳÆþ¤µ¤ì¡¢1.3.24 ¤Çºï½ü¤µ¤ì¤¿¡£
-(¤º¤Ã¤ÈÁ°¤Ï¡¢¥Þ¥Ã¥×¸µ¤Î¥Õ¥¡¥¤¥ë¤Ø¤Î½ñ¤­¹þ¤ß¤ò¹Ô¤ª¤¦¤È¤¹¤ë¤È¡¢¥¨¥é¡¼
-.B ETXTBUSY
-¤Ç¼ºÇÔ¤¹¤ë¤è¤¦¤Ë¥·¥°¥Ê¥ë¤¬ÀßÄꤵ¤ì¤Æ¤¤¤¿¤¬¡¢¤³¤ì¤Ï denial-of-service
-(¥µ¡¼¥Ó¥¹µñÈÝ) ¹¶·â¤Î¸¶°ø¤È¤Ê¤Ã¤¿)¡£
-.TP
-.B MAP_EXECUTABLE
-.\"O This flag is ignored.
-¤³¤Î¥Õ¥é¥°¤Ï̵»ë¤µ¤ì¤ë¡£
-.\"O .\" Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
-.\"O .\" (Long ago, it signaled that the underlying file is an executable.
-.\"O .\" However, that information was not really used anywhere.)
-.\"O .\" Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
-.\"O .\" MAP_DENYWRITE?
-.\" 1.1.38 ¤ÇƳÆþ¤µ¤ì¡¢1.3.24 ¤Çºï½ü¤µ¤ì¤¿¡£
-.\" proc_follow_link ¤Ç¥Æ¥¹¥È¤µ¤ì¤ë¥Õ¥é¥°¤Ç¤¢¤ë¡£(¤º¤Ã¤ÈÁ°¤Ï¡¢
-.\" ¥Þ¥Ã¥×¸µ¤Î¥Õ¥¡¥¤¥ë¤¬¼Â¹Ô²Äǽ¤Ç¤¢¤ë¤³¤È¤òÃΤ餻¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤¿¡£
-.\" ¤·¤«¤·¡¢¤½¤Î¾ðÊó¤Ï¼ÂºÝ¤Ë¤Ï¤É¤³¤Ç¤â»È¤ï¤ì¤Ê¤«¤Ã¤¿¡£)
-.\" Linus ¤Ï MAP_EXECUTABLE ¤Ë´ØÏ¢¤·¤Æ DoS ¤ÎÏäò¤·¤¿¤¬¡¢
-.\" MAP_DENYWRITE ¤Î¤³¤È¤ò¹Í¤¨¤Æ¤¤¤¿¤Î¤«¤Ê¡©
-.TP
-.B MAP_FILE
-.\"O Compatibility flag.
-.\"O Ignored.
-¸ß´¹À­¤Î¤¿¤á¤Î¥Õ¥é¥°¡£Ìµ»ë¤µ¤ì¤ë¡£
+マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフラグがサポートされているのは x86\-64 アーキテクチャ上の 64
+ビットプログラムのみである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB 以内の どこかに割り当てることで、初期のいくつかの
+64 ビットプロセッサにおける コンテキストスイッチの性能問題を改善するためである。 最近の x86\-64 プロセッサではこの性能問題はもはや存在せず、
+そのようなシステムではこのフラグを使用する必要はない。 \fBMAP_FIXED\fP がセットされている場合は、 \fBMAP_32BIT\fP
+フラグは無視される。
+.TP 
+\fBMAP_ANON\fP
+\fBMAP_ANONYMOUS\fP の同義語。非推奨。
+.TP 
+\fBMAP_ANONYMOUS\fP
+マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化される。 引き数 \fIfd\fP と \fIoffset\fP は無視される。
+ただし、実装によっては \fBMAP_ANONYMOUS\fP (もしくは \fBMAP_ANON\fP)  が指定された場合、 \fIfd\fP を \-1
+にする必要があり、 移植性が必要なアプリケーションでは必ず \fIfd\fP を \-1 にすべきである。 \fBMAP_ANONYMOUS\fP と
+\fBMAP_SHARED\fP を組み合わせての利用は カーネル 2.4 以降の Linux でのみサポートされている。
+.TP 
+\fBMAP_DENYWRITE\fP
+.\" Introduced in 1.1.36, removed in 1.3.24.
+このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうとすると、エラー \fBETXTBUSY\fP
+で失敗するようにシグナルが設定されていたが、これは denial\-of\-service (サービス拒否) 攻撃の原因となった)。
+.TP 
+\fBMAP_EXECUTABLE\fP
+.\" Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
+.\" (Long ago, it signaled that the underlying file is an executable.
+.\" However, that information was not really used anywhere.)
+.\" Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
+.\" MAP_DENYWRITE?
+このフラグは無視される。
+.TP 
+\fBMAP_FILE\fP
 .\" On some systems, this was required as the opposite of
 .\" MAP_ANONYMOUS -- mtk, 1 May 2007
-.TP
-.B MAP_FIXED
-.\"O Don't interpret
-.\"O .I addr
-.\"O as a hint: place the mapping at exactly that address.
-.\"O .I addr
-.\"O must be a multiple of the page size.
-.I addr
-¤ò¥¢¥É¥ì¥¹¤Î¥Ò¥ó¥È¤È¤·¤Æ»ÈÍѤ¹¤ë¤Î¤Ç¤Ï¤Ê¤¯¡¢
-.I addr
-¤Ç»ØÄꤵ¤ì¤¿¥¢¥É¥ì¥¹¤ò¤½¤Î¤Þ¤Þ»ÈÍѤ·¤Æ¥Þ¥Ã¥Ô¥ó¥°¤òÇÛÃÖ¤¹¤ë¡£
-.I addr
-¤Ï¥Ú¡¼¥¸¥µ¥¤¥º¤ÎÇÜ¿ô¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
-.\"O If the memory region specified by
-.\"O .I addr
-.\"O and
-.\"O .I len
-.\"O overlaps pages of any existing mapping(s), then the overlapped
-.\"O part of the existing mapping(s) will be discarded.
-.I addr
-¤È
-.I len
-¤Ç»ØÄꤵ¤ì¤¿¥á¥â¥êÎΰ褬´û¸¤Î¥Þ¥Ã¥Ô¥ó¥°¤Î¥Ú¡¼¥¸¤È½Å¤Ê¤ë¾ì¹ç¡¢
-´û¸¤Î¥Þ¥Ã¥Ô¥ó¥°¤Î½Å¤Ê¤Ã¤¿Éôʬ¤Ï¼Î¤Æ¤é¤ì¤ë¡£
-.\"O If the specified address cannot be used,
-.\"O .BR mmap ()
-.\"O will fail.
-¤â¤·»ØÄꤵ¤ì¤¿¥¢¥É¥ì¥¹¤¬»ÈÍѤǤ­¤Ê¤¤¾ì¹ç¡¢
-.BR mmap ()
-¤Ï¼ºÇÔ¤¹¤ë¡£
-.\"O Because requiring a fixed address for a mapping is less portable,
-.\"O the use of this option is discouraged.
-¥Þ¥Ã¥Ô¥ó¥°¤ËÂФ·¤Æ¸ÇÄꥢ¥É¥ì¥¹¤òÍ׵᤹¤ë¤Î¤Ï°Ü¿¢À­¤ÎÌ̤ÇÎô¤ë¤Î¤Ç¡¢
-¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï»ÈÍѤ·¤Ê¤¤¤³¤È¤ò¿ä¾©¤¹¤ë¡£
-.TP
-.B MAP_GROWSDOWN
-.\"O Used for stacks.
-.\"O Indicates to the kernel virtual memory system that the mapping
-.\"O should extend downwards in memory.
-¥¹¥¿¥Ã¥¯ÍѤ˻ÈÍѤµ¤ì¤ë¡£¥Þ¥Ã¥Ô¥ó¥°¤ò¥á¥â¥êÆâ¤ÇµÕ¸þ¤­¤Ë¹Ô¤¦¤³¤È¤ò
-¥«¡¼¥Í¥ë²¾ÁÛ¥á¥â¥ê¥·¥¹¥Æ¥à¤Ë»Ø¼¨¤¹¤ë¡£
-(ÌõÃí¡§¥Þ¥Ã¥Ô¥ó¥°¤ÏÄ̾ï¤Ï¥á¥â¥ê¡¦¥¢¥É¥ì¥¹¤¬Áý²Ã¤¹¤ë¸þ¤­¤Ë¹Ô¤¦¤¬¡¢
-¤³¤Î¥ª¥×¥·¥ç¥ó¤ò»ØÄꤹ¤ë¤ÈµÕ¸þ¤­¤Ë¥Þ¥Ã¥Ô¥ó¥°¤ò¹Ô¤¦)
-.TP
-.\"O .BR MAP_HUGETLB " (since Linux 2.6.32)"
-.BR MAP_HUGETLB " (Linux 2.6.32 °Ê¹ß)"
-.\"O Allocate the mapping using "huge pages."
-.\"O See the kernel source file
-.\"O .I Documentation/vm/hugetlbpage.txt
-.\"O for further information.
-"huge page" ¤ò»È¤Ã¤Æ¥Þ¥Ã¥Ô¥ó¥°¤ò³ä¤êÅö¤Æ¤ë¡£
-¾Ü¤·¤¤¾ðÊó¤Ï¡¢¥«¡¼¥Í¥ë¡¦¥½¡¼¥¹¤Î
-.I Documentation/vm/hugetlbpage.txt
-¤ò»²¾È¡£
-.TP
-.\"O .BR MAP_LOCKED " (since Linux 2.5.37)"
-.BR MAP_LOCKED " (Linux 2.5.37 °Ê¹ß)"
-.\"O Lock the pages of the mapped region into memory in the manner of
-.\"O .BR mlock (2).
-.\"O This flag is ignored in older kernels.
-.\"O .\" If set, the mapped pages will not be swapped out.
-¥Þ¥Ã¥×¤µ¤ì¤¿Îΰè¤Î¥Ú¡¼¥¸¤ò
-.BR mlock (2)
-¤ÎÊýË¡¤Ç¥á¥â¥êÆâ¤Ë¥í¥Ã¥¯¤¹¤ë¡£
-¤½¤ì°ÊÁ°¤Î¥«¡¼¥Í¥ë¤Ç¤Ï¡¢¤³¤Î¥Õ¥é¥°¤Ï̵»ë¤µ¤ì¤ë¡£
-.\" ¤³¤Î¥Õ¥é¥°¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¤È¡¢¥Þ¥Ã¥Ô¥ó¥°¤µ¤ì¤¿¥Ú¡¼¥¸¤Ï¥¹¥ï¥Ã¥×¥¢¥¦¥È
-.\" ¤µ¤ì¤Ê¤¤¡£
-.TP
-.\"O .BR MAP_NONBLOCK " (since Linux 2.5.46)"
-.BR MAP_NONBLOCK " (Linux 2.5.46 °Ê¹ß)"
-.\"O Only meaningful in conjunction with
-.\"O .BR MAP_POPULATE .
-.\"O Don't perform read-ahead:
-.\"O only create page tables entries for pages
-.\"O that are already present in RAM.
-.B MAP_POPULATE
-¤ÈÁȤ߹ç¤ï¤»¤¿¾ì¹ç¤Î¤ß°ÕÌ£¤ò»ý¤Ä¡£
-read-ahead (Á°¤â¤Ã¤ÆÆɤ߹þ¤à¤³¤È) ¤ò¼Â¹Ô¤·¤Ê¤¤¡£
-ñ¤Ë¡¢¤¹¤Ç¤Ë RAM ¾å¤Ë¸ºß¤¹¤ë¥Ú¡¼¥¸¤ËÂФ·¤Æ
-¥Ú¡¼¥¸¥Æ¡¼¥Ö¥ë¥¨¥ó¥È¥ê¤òºîÀ®¤¹¤ë¤À¤±¤Ç¤¢¤ë¡£
-.\"O Since Linux 2.6.23, this flag causes
-.\"O .BR MAP_POPULATE
-.\"O to do nothing.
-.\"O One day the combination of
-.\"O .BR MAP_POPULATE
-.\"O and
-.\"O .BR MAP_NONBLOCK
-.\"O may be reimplemented.
-Linux 2.6.23 °Ê¹ß¤Ç¤Ï¡¢¤³¤Î¥Õ¥é¥°¤Ï
-.B MAP_POPULATE
-¤Ë²¿¤Î±Æ¶Á¤âÍ¿¤¨¤Ê¤¤¡£
-¤¤¤Ä¤«
-.B MAP_POPULATE
-¤È
-.B MAP_NONBLOCK
-¤òÁȤ߹ç¤ï¤»¤¿¾ì¹ç¤ÎÆ°ºî¤Ï¼ÂÁõ¤·Ä¾¤µ¤ì¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
-.TP
-.B MAP_NORESERVE
-.\"O Do not reserve swap space for this mapping.
-.\"O When swap space is reserved, one has the guarantee
-.\"O that it is possible to modify the mapping.
-.\"O When swap space is not reserved one might get
-.\"O .B SIGSEGV
-.\"O upon a write
-.\"O if no physical memory is available.
-¤³¤Î¥Þ¥Ã¥Ô¥ó¥°¤ËÂФ¹¤ë¥¹¥ï¥Ã¥×¶õ´Ö¤ÎͽÌó¤ò¹Ô¤ï¤Ê¤¤¡£
-¥¹¥ï¥Ã¥×¶õ´Ö¤òͽÌó¤·¤¿¾ì¹ç¤Ï¡¢¤³¤Î¥Þ¥Ã¥Ô¥ó¥°¤ÎÊѹ¹¤¬É¬¤º²Äǽ¤Ê¤³¤È¤¬
-Êݾڤµ¤ì¤ë¡£Í½Ìó¤ò¹Ô¤ï¤Ê¤«¤Ã¤¿¾ì¹ç¡¢ÊªÍý¥á¥â¥ê¤Ë¶õ¤­¤¬¤Ê¤¤¤È
-½ñ¤­¹þ¤ß»þ¤Ë
-.B SIGSEGV
-¥¨¥é¡¼¤ò¼õ¤±¼è¤ë¤³¤È¤¬¤¢¤ë¡£
-.\"O See also the discussion of the file
-.\"O .I /proc/sys/vm/overcommit_memory
-.\"O in
-.\"O .BR proc (5).
-.\"O In kernels before 2.6, this flag only had effect for
-.\"O private writable mappings.
-.BR proc (5)
-¤Î
-.I /proc/sys/vm/overcommit_memory
-¥Õ¥¡¥¤¥ë¤Ë¤Ä¤¤¤Æ¤ÎµÄÏÀ¤â»²¾È¡£
-¥Ð¡¼¥¸¥ç¥ó 2.6 ¤è¤êÁ°¤Î¥«¡¼¥Í¥ë¤Ç¤Ï¡¢¤³¤Î¥Õ¥é¥°¤Ï½ñ¤­¹þ¤ß²Äǽ¤Ê
-¥×¥é¥¤¥Ù¡¼¥È¡¦¥Þ¥Ã¥Ô¥ó¥°¤Ë¤Ä¤¤¤Æ¤Î¤ß¸ú²Ì¤¬¤¢¤Ã¤¿¡£
-.TP
-.\"O .BR MAP_POPULATE " (since Linux 2.5.46)"
-.BR MAP_POPULATE " (Linux 2.5.46 °Ê¹ß)"
-.\"O Populate (prefault) page tables for a mapping.
-.\"O For a file mapping, this causes read-ahead on the file.
-.\"O Later accesses to the mapping will not be blocked by page faults.
-.\"O .BR MAP_POPULATE
-.\"O is only supported for private mappings since Linux 2.6.23.
-¥Þ¥Ã¥Ô¥ó¥°ÍѤΥڡ¼¥¸¥Æ¡¼¥Ö¥ë¤òÇÛÃÖ (populate) ¤¹¤ë
-¥Õ¥¡¥¤¥ë¥Þ¥Ã¥Ô¥ó¥°¤Î¾ì¹ç¤Ë¤Ï¡¢¤³¤ì¤Ë¤è¤ê¥Õ¥¡¥¤¥ë¤¬ÀèÆɤߠ(read-ahead)
-¤¬¹Ô¤ï¤ì¤ë¡£¤³¤Î°Ê¸å¤Ï¡¢¥Þ¥Ã¥Ô¥ó¥°¤ËÂФ¹¤ë¥¢¥¯¥»¥¹¤¬¥Ú¡¼¥¸¥Õ¥©¡¼¥ë¥È¤Ç
-¥Ö¥í¥Ã¥¯¤µ¤ì¤ë¤³¤È¤¬¤Ê¤¯¤Ê¤ë¡£
-.BR MAP_POPULATE
-¤Ï Linux 2.6.23 °Ê¹ß¤Ç¥×¥é¥¤¥Ù¡¼¥È¡¦¥Þ¥Ã¥Ô¥ó¥°¤Ë¤Ä¤¤¤Æ¤Î¤ß
-¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë¡£
-.LP
-.\"O Of the above flags, only
-.\"O .B MAP_FIXED
-.\"O is specified in POSIX.1-2001.
-.\"O However, most systems also support
-.\"O .B MAP_ANONYMOUS
-.\"O (or its synonym
-.\"O .BR MAP_ANON ).
-¾åµ­¤Î¥Õ¥é¥°¤ÎÃæ¤Ç¤Ï¡¢
-.B MAP_FIXED
-¤À¤±¤¬ POSIX.1-2001 ¤Çµ¬Äꤵ¤ì¤Æ¤¤¤ë¡£
-¤·¤«¤·¤Ê¤¬¤é¡¢¤Û¤È¤ó¤É¤Î¥·¥¹¥Æ¥à¤Ç
-.B MAP_ANONYMOUS
-(¤Þ¤¿¤Ï¤½¤ÎƱµÁ¸ì¤Ç¤¢¤ë
-.BR MAP_ANON )
-¤â¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë¡£
-.TP
-.\"O .BR MAP_STACK " (since Linux 2.6.27)"
-.BR MAP_STACK " (Linux 2.6.27 °Ê¹ß)"
-.\"O Allocate the mapping at an address suitable for a process
-.\"O or thread stack.
-.\"O This flag is currently a no-op,
-.\"O but is used in the glibc threading implementation so that
-.\"O if some architectures require special treatment for stack allocations,
-.\"O support can later be transparently implemented for glibc.
-¥×¥í¥»¥¹¤ä¥¹¥ì¥Ã¥É¤Î¥¹¥¿¥Ã¥¯¤ËŬ¤·¤¿¥¢¥É¥ì¥¹¤Ë¥Þ¥Ã¥Ô¥ó¥°¤ò³ä¤êÅö¤Æ¤ë¡£
-¸½ºß¤Î¤È¤³¤í¡¢¤³¤Î¥Õ¥é¥°¤Ï²¿¤â¤·¤Ê¤¤¤¬¡¢
-glibc ¤Î¥¹¥ì¥Ã¥É¼ÂÁõ¤Ç¤Ï»ÈÍѤµ¤ì¤Æ¤¤¤ë¡£
-¤³¤ì¤Ï¡¢¤¤¤¯¤Ä¤«¤Î¥¢¡¼¥­¥Æ¥¯¥Á¥ã¤Ç¤Ï¥¹¥¿¥Ã¥¯¤Î³ä¤êÅö¤Æ¤Ë´Ø¤·¤ÆÆÃÊ̤ʰ·¤¤
-¤¬É¬Íפʾì¹ç¤Ë¡¢glibc ¤Ë¤½¤Î¥µ¥Ý¡¼¥È¤ò¸å¤ÇÆ©²áŪ¤Ë¼ÂÁõ¤Ç¤­¤ë¤è¤¦¤Ë¤¹¤ë
-¤¿¤á¤Ç¤¢¤ë¡£
+互換性のためのフラグ。無視される。
+.TP 
+\fBMAP_FIXED\fP
+\fIaddr\fP をアドレスのヒントとして使用するのではなく、 \fIaddr\fP で指定されたアドレスをそのまま使用してマッピングを配置する。
+\fIaddr\fP はページサイズの倍数でなければならない。 \fIaddr\fP と \fIlen\fP
+で指定されたメモリ領域が既存のマッピングのページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定されたアドレスが使用できない場合、
+\fBmmap\fP()  は失敗する。 マッピングに対して固定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないことを推奨する。
+.TP 
+\fBMAP_GROWSDOWN\fP
+スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想メモリシステムに指示する。
+(訳注:マッピングは通常はメモリ・アドレスが増加する向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)
+.TP 
+\fBMAP_HUGETLB\fP (Linux 2.6.32 以降)
+"huge page" を使ってマッピングを割り当てる。詳しい情報は、Linux カーネルソースの
+\fIDocumentation/vm/hugetlbpage.txt\fP を参照。
+.TP 
+\fBMAP_LOCKED\fP (Linux 2.5.37 以降)
+.\" If set, the mapped pages will not be swapped out.
+マップされた領域のページを \fBmlock\fP(2)  の方法でメモリ内にロックする。 それ以前のカーネルでは、このフラグは無視される。
+.TP 
+\fBMAP_NONBLOCK\fP (Linux 2.5.46 以降)
+\fBMAP_POPULATE\fP と組み合わせた場合のみ意味を持つ。 read\-ahead (前もって読み込むこと) を実行しない。 単に、すでに RAM
+上に存在するページに対してのみページテーブルエントリを作成する。 Linux 2.6.23 以降では、このフラグは \fBMAP_POPULATE\fP
+に何の影響も与えない。 いつか \fBMAP_POPULATE\fP と \fBMAP_NONBLOCK\fP
+を組み合わせた場合の動作は実装し直されるかもしれない。
+.TP 
+\fBMAP_NORESERVE\fP
+このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合は、このマッピングの変更が必ず可能なことが
+保証される。予約を行わなかった場合、物理メモリに空きがないと 書き込み時に \fBSIGSEGV\fP エラーを受け取ることがある。 \fBproc\fP(5)
+の \fI/proc/sys/vm/overcommit_memory\fP ファイルについての議論も参照。 バージョン 2.6
+より前のカーネルでは、このフラグは書き込み可能な プライベート・マッピングについてのみ効果があった。
+.TP 
+\fBMAP_POPULATE\fP (Linux 2.5.46 以降)
+マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合には、これによりファイルが先読み (read\-ahead)
+が行われる。この以後は、マッピングに対するアクセスがページフォールトで ブロックされることがなくなる。 Linux 2.6.23
+以降でのみプライベート・マッピングについて \fBMAP_POPULATE\fP がサポートされている。
+.TP 
+\fBMAP_STACK\fP (Linux 2.6.27 以降)
 .\" See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
 .\" commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
 .\" http://thread.gmane.org/gmane.linux.kernel/720412
 .\" "pthread_create() slow for many threads; also time to revisit 64b
 .\"  context switch optimization?"
+プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在のところ、このフラグは何もしないが、 glibc
+のスレッド実装では使用されている。 これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必要な場合に、glibc
+にそのサポートを後で透過的に実装できるようにする ためである。
+.TP 
+\fBMAP_UNINITIALIZED\fP (Linux 2.6.33 以降)
+無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイス
+での性能向上を目的に作られてものである。カーネルの設定で
+\fBCONFIG_MMAP_ALLOW_UNINITIALIZED\fP オプションが有効になっている場合のみ、
+このフラグは効果を持つ。
+セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、
+ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。
+.LP
+上記のフラグの中では、 \fBMAP_FIXED\fP だけが POSIX.1\-2001 で規定されている。 しかしながら、ほとんどのシステムで
+\fBMAP_ANONYMOUS\fP (またはその同義語である \fBMAP_ANON\fP)  もサポートされている。
 .LP
-.\"O Some systems document the additional flags
-.\"O .BR MAP_AUTOGROW ,
-.\"O .BR MAP_AUTORESRV ,
-.\"O .BR MAP_COPY ,
-.\"O and
-.\"O .BR MAP_LOCAL .
-¤¤¤¯¤Ä¤«¤Î¥·¥¹¥Æ¥à¤Ç¤Ï¡¢¾åµ­°Ê³°¤Ë¥Õ¥é¥°¤È¤·¤Æ
-.BR MAP_AUTOGROW ,
-.BR MAP_AUTORESRV ,
-.BR MAP_COPY ,
-.B MAP_LOCAL
-¤¬µ¬Äꤵ¤ì¤Æ¤¤¤ë¡£
+いくつかのシステムでは、上記以外にフラグとして \fBMAP_AUTOGROW\fP, \fBMAP_AUTORESRV\fP, \fBMAP_COPY\fP,
+\fBMAP_LOCAL\fP が規定されている。
 .LP
-.\"O Memory mapped by
-.\"O .BR mmap ()
-.\"O is preserved across
-.\"O .BR fork (2),
-.\"O with the same attributes.
-.BR mmap ()
-¤Ë¤è¤Ã¤Æ¥Þ¥Ã¥×¤µ¤ì¤¿¥á¥â¥ê¤Î°À­¤Ï
-.BR fork (2)
-¤ÎºÝ¤Ë·Ñ¾µ¤µ¤ì¤ë¡£
+\fBmmap\fP()  によってマップされたメモリの属性は \fBfork\fP(2)  の際に継承される。
 .LP
-.\"O A file is mapped in multiples of the page size.
-.\"O For a file that is not
-.\"O a multiple of the page size, the remaining memory is zeroed when mapped,
-.\"O and writes to that region are not written out to the file.
-.\"O The effect of
-.\"O changing the size of the underlying file of a mapping on the pages that
-.\"O correspond to added or removed regions of the file is unspecified.
-¥Õ¥¡¥¤¥ë¤Ï¥Ú¡¼¥¸¥µ¥¤¥º¤ÎÀ°¿ôÇܤÎÎΰè¤Ë¥Þ¥Ã¥×¤µ¤ì¤ë¡£¥µ¥¤¥º¤¬¥Ú¡¼¥¸¥µ¥¤¥º¤Î
-À°¿ôÇܤǤʤ¤¥Õ¥¡¥¤¥ë¤Î¾ì¹ç¡¢¥Þ¥Ã¥×»þ¤Ë»Ä¤ê¤ÎÎΰè¤Ï 0 ¤ÇËä¤á¤é¤ì¡¢¤³¤ÎÎΰè¤Ø
-½ñ¤­¤³¤ß¤ò¹Ô¤Ã¤Æ¤â¥Õ¥¡¥¤¥ë¤Ë½ñ¤­½Ð¤µ¤ì¤ë¤³¤È¤Ï¤Ê¤¤¡£¥Þ¥Ã¥Ô¥ó¥°¤ò¹Ô¤Ã¤¿¸µ
-¥Õ¥¡¥¤¥ë¤Î¥µ¥¤¥º¤òÊѹ¹¤·¤¿¾ì¹ç¡¢¸µ¥Õ¥¡¥¤¥ë¤ÎÄɲ䵤줿¤êºï½ü¤µ¤ì¤¿Îΰè¤ËÂбþ
-¤¹¤ë¥Þ¥Ã¥×¤µ¤ì¤¿¥Ú¡¼¥¸¤ËÂФ·¤Æ¤É¤Î¤è¤¦¤Ê±Æ¶Á¤¬¤¢¤ë¤«¤Ïµ¬Äꤵ¤ì¤Æ¤¤¤Ê¤¤¡£
+ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整数倍でないファイルの場合、マップ時に残りの領域は 0
+で埋められ、この領域へ 書きこみを行ってもファイルに書き出されることはない。マッピングを行った元
+ファイルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 するマップされたページに対してどのような影響があるかは規定されていない。
 .SS munmap()
-.\"O The
-.\"O .BR munmap ()
-.\"O system call deletes the mappings for the specified address range, and
-.\"O causes further references to addresses within the range to generate
-.\"O invalid memory references.
-.\"O The region is also automatically unmapped
-.\"O when the process is terminated.
-.\"O On the other hand, closing the file
-.\"O descriptor does not unmap the region.
-¥·¥¹¥Æ¥à¥³¡¼¥ë
-.BR munmap ()
-¤Ï»ØÄꤵ¤ì¤¿¥¢¥É¥ì¥¹ÈϰϤΥޥåפò¾Ãµî¤·¡¢
-¤³¤ì°Ê¹ß¤Î¤½¤ÎÈÏ°ÏÆâ¤Ø¤Î¥á¥â¥ê»²¾È¤ÏÉÔÀµ¤È¤Ê¤ë¡£
-¤³¤ÎÎΰè¤Ï¡¢¥×¥í¥»¥¹¤¬½ªÎ»¤·¤¿¤È¤­¤Ë¤â¼«Æ°Åª¤Ë¥¢¥ó¥Þ¥Ã¥×¤µ¤ì¤ë¡£
-°ìÊý¡¢¥Õ¥¡¥¤¥ëµ­½Ò»Ò¤ò¥¯¥í¡¼¥º¤·¤Æ¤â¡¢¤³¤ÎÎΰè¤Ï¥¢¥ó¥Þ¥Ã¥×¤µ¤ì¤Ê¤¤¡£
+システムコール \fBmunmap\fP()  は指定されたアドレス範囲のマップを消去し、 これ以降のその範囲内へのメモリ参照は不正となる。
+この領域は、プロセスが終了したときにも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域はアンマップされない。
 .LP
-.\"O The address
-.\"O .I addr
-.\"O must be a multiple of the page size.
-.\"O All pages containing a part
-.\"O of the indicated range are unmapped, and subsequent references
-.\"O to these pages will generate
-.\"O .BR SIGSEGV .
-.\"O It is not an error if the
-.\"O indicated range does not contain any mapped pages.
-.I addr
-¥¢¥É¥ì¥¹¤Ï¥Ú¡¼¥¸¥µ¥¤¥º¤ÎÀ°¿ôÇܤǤʤ±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£»ØÄꤵ¤ì¤¿ÈϰϤΰìÉôʬ¤ò
-´Þ¤àÁ´¤Æ¤Î¥Ú¡¼¥¸¤Ï¥¢¥ó¥Þ¥Ã¥×¤µ¤ì¡¢¤³¤ì°Ê¹ß¤Ë¤³¤ì¤é¤Î¥Ú¡¼¥¸¤Ø¤Î»²¾È¤¬¤¢¤ë¤È
-.B SIGSEGV
-¤¬È¯À¸¤¹¤ë¡£
-»ØÄꤷ¤¿ÈÏ°ÏÆâ¤Ë¥Þ¥Ã¥×¤µ¤ì¤¿¥Ú¡¼¥¸¤¬°ì¤Ä¤â´Þ¤Þ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ç¤â
-¥¨¥é¡¼¤Ë¤Ê¤é¤Ê¤¤¡£
-.\"O .SS Timestamps changes for file-backed mappings
-.SS ¥Õ¥¡¥¤¥ë¤È´ØÏ¢ÉÕ¤±¤é¤ì¤¿¥Þ¥Ã¥Ô¥ó¥°¤ËÂФ¹¤ë¥¿¥¤¥à¥¹¥¿¥ó¥×¤Î¹¹¿·
-.\"O For file-backed mappings, the
-.\"O .I st_atime
-.\"O field for the mapped file may be updated at any time between the
-.\"O .BR mmap ()
-.\"O and the corresponding unmapping; the first reference to a mapped
-.\"O page will update the field if it has not been already.
-¥Õ¥¡¥¤¥ë¤È´ØÏ¢ÉÕ¤±¤é¤ì¤¿¥Þ¥Ã¥Ô¥ó¥°¤Î¾ì¹ç¡¢¥Þ¥Ã¥Ô¥ó¥°¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤Î
-.I st_atime
-¥Õ¥£¡¼¥ë¥É¤Ï¡¢
-.BR mmap ()
-¤µ¤ì¤Æ¤«¤é¥¢¥ó¥Þ¥Ã¥× (unmap) ¤µ¤ì¤ë¤Þ¤Ç¤Î´Ö¤Ë¹¹¿·¤µ¤ì¤ë¤³¤È¤¬¤¢¤ë¡£
-¤½¤ì¤Þ¤Ç¤Ë¹¹¿·¤¬¹Ô¤ï¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¡¢¥Þ¥Ã¥×¤µ¤ì¤¿¥Ú¡¼¥¸¤Ø¤ÎºÇ½é¤Î»²¾È¤¬¤¢¤Ã¤¿
-ºÝ¤Ë¹¹¿·¤µ¤ì¤ë¡£
+\fIaddr\fP アドレスはページサイズの整数倍でなければならない。指定された範囲の一部分を
+含む全てのページはアンマップされ、これ以降にこれらのページへの参照があると \fBSIGSEGV\fP が発生する。
+指定した範囲内にマップされたページが一つも含まれていない場合でも エラーにならない。
+.SS ファイルと関連付けられたマッピングに対するタイムスタンプの更新
+ファイルと関連付けられたマッピングの場合、マッピングされたファイルの \fIst_atime\fP フィールドは、 \fBmmap\fP()  されてからアンマップ
+(unmap) されるまでの間に更新されることがある。 それまでに更新が行われていなければ、マップされたページへの最初の参照があった 際に更新される。
 .LP
-.\"O The
-.\"O .I st_ctime
-.\"O and
-.\"O .I st_mtime
-.\"O field for a file mapped with
-.\"O .B PROT_WRITE
-.\"O and
-.\"O .B MAP_SHARED
-.\"O will be updated after
-.\"O a write to the mapped region, and before a subsequent
-.\"O .BR msync (2)
-.\"O with the
-.\"O .B MS_SYNC
-.\"O or
-.\"O .B MS_ASYNC
-.\"O flag, if one occurs.
-.B PROT_WRITE
-¤È
-.B MAP_SHARED
-¤ÎξÊý¤ò»ØÄꤷ¤Æ¥Þ¥Ã¥×¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤Î¾ì¹ç¡¢½ñ¤­¹þ¤ß¤¬¤¢¤ë¤È¡¢
-.I st_ctime
-¤È
-.I st_mtime
-¤Îξ¥Õ¥£¡¼¥ë¥É¤Ï¡¢¥Þ¥Ã¥×¤µ¤ì¤¿Îΰè¤Ø¤Î½ñ¤­¹þ¤ß¤è¤ê¸å¤Ç¡¢
-.B MS_SYNC
-¤Þ¤¿¤Ï
-.B MS_ASYNC
-¥Õ¥é¥°¤ò»ØÄꤷ¤Æ
-.BR msync (2)
-¤¬¸Æ¤Ð¤ì¤ëÁ°¤Þ¤Ç¤Ë¹¹¿·¤µ¤ì¤ë¡£
-.\"O .SH "RETURN VALUE"
-.SH ÊÖ¤êÃÍ
-.\"O On success,
-.\"O .BR mmap ()
-.\"O returns a pointer to the mapped area.
-.\"O On error, the value
-.\"O .B MAP_FAILED
-.\"O (that is,
-.\"O .IR "(void\ *)\ \-1" )
-.\"O is returned, and
-.\"O .I errno
-.\"O is set appropriately.
-.BR mmap ()
-¤ÏÀ®¸ù¤¹¤ë¤È¥Þ¥Ã¥×¤µ¤ì¤¿Îΰè¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£
-¼ºÇÔ¤¹¤ë¤ÈÃÍ
-.B MAP_FAILED
-(¤Ä¤Þ¤ê
-.IR "(void\ *)\ \-1" )
-¤òÊÖ¤·¡¢
-.I errno
-¤¬¥¨¥é¡¼¤ÎÆâÍƤˤ·¤¿¤¬¤Ã¤Æ¥»¥Ã¥È¤µ¤ì¤ë¡£
-.\"O On success,
-.\"O .BR munmap ()
-.\"O returns 0, on failure \-1, and
-.\"O .I errno
-.\"O is set (probably to
-.\"O .BR EINVAL ).
-.BR munmap ()
-¤ÏÀ®¸ù¤¹¤ë¤È 0 ¤òÊÖ¤¹¡£¼ºÇÔ¤¹¤ë¤È \-1 ¤òÊÖ¤·¡¢
-.I errno
-¤¬¥»¥Ã¥È¤µ¤ì¤ë (¿¤¯¤Î¾ì¹ç
-.B EINVAL
-¤Ë¤Ê¤ë¤À¤í¤¦)¡£
-.\"O .SH ERRORS
-.SH ¥¨¥é¡¼
-.TP
-.B EACCES
-.\"O A file descriptor refers to a non-regular file.
-.\"O Or
-.\"O .B MAP_PRIVATE
-.\"O was requested, but
-.\"O .I fd
-.\"O is not open for reading.
-.\"O Or
-.\"O .B MAP_SHARED
-.\"O was requested and
-.\"O .B PROT_WRITE
-.\"O is set, but
-.\"O .I fd
-.\"O is not open in read/write
-.\"O .RB ( O_RDWR )
-.\"O mode.
-.\"O \"O Or
-.\"O .B PROT_WRITE
-.\"O is set, but the file is append-only.
-°Ê²¼¤Î¤¤¤º¤ì¤«¤Î¾ì¹ç¡£
-¥Õ¥¡¥¤¥ëµ­½Ò»Ò¤Î»²¾ÈÀ褬Ä̾ï¤Î¥Õ¥¡¥¤¥ë¤Ç¤Ï¤Ê¤¤ (non-regular file) ¡£
-.B MAP_PRIVATE
-¤òÍ׵ᤷ¤¿¤¬
-.I fd
-¤ÏÆɤ߹þ¤ßÍѤ˥ª¡¼¥×¥ó¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
-.B MAP_SHARED
-¤òÍ׵ᤷ¤Æ
-.B PROT_WRITE
-¤ò¥»¥Ã¥È¤·¤¿¤¬
-.I fd
-¤ÏÆɤ߽ñ¤­¥â¡¼¥É
-.RB ( O_RDWR )
-¤Ç¥ª¡¼¥×¥ó¤µ¤ì¤Æ¤¤¤Ê¤¤¡¢
-.B PROT_WRITE
-¤ò¥»¥Ã¥È¤·¤¿¤¬¡¢¥Õ¥¡¥¤¥ë¤ÏÄɲà(append) ÀìÍѤǤ¢¤ë¡£
-.TP
-.B EAGAIN
-.\"O The file has been locked, or too much memory has been locked (see
-.\"O .BR setrlimit (2)).
-¥Õ¥¡¥¤¥ë¤¬¥í¥Ã¥¯¤µ¤ì¤Æ¤¤¤ë¡£¤Þ¤¿¤Ï¥í¥Ã¥¯¤µ¤ì¤Æ¤¤¤ë¥á¥â¥ê¤¬Â¿¤¹¤®¤ë
-.RB ( setrlimit (2)
-¤ò»²¾È)¡£
-.TP
-.B EBADF
-.\"O .I fd
-.\"O is not a valid file descriptor (and
-.\"O .B MAP_ANONYMOUS
-.\"O was not set).
-.I fd
-¤¬Í­¸ú¤Ê¥Õ¥¡¥¤¥ëµ­½Ò»Ò (file descriptor) ¤Ç¤Ï¤Ê¤¤
-(¤«¤Ä
-.B MAP_ANONYMOUS
-¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤Ê¤¤)¡£
-.TP
-.B EINVAL
-.\"O We don't like
-.\"O .IR addr ,
-.\"O .IR length ,
-.\"O or
-.\"O .I offset
-.\"O (e.g., they are too large, or not aligned on a page boundary).
-.I addr
-¤«
-.I length
-¤«
-.I offset
-¤¬Å¬ÀڤǤʤ¤
-(Î㤨¤Ð¡¢Â礭¤¹¤®¤ë¤È¤«¡¢¥Ú¡¼¥¸¶­³¦¤Ë¥¢¥é¥¤¥ó¥á¥ó¥È¤µ¤ì¤Æ¤¤¤Ê¤¤)¡£
-.TP
-.B EINVAL
-.\"O (since Linux 2.6.12)
-.\"O .I length
-.\"O was 0.
-(Linux 2.6.12 °Ê¹ß)
-.I length
-¤¬ 0 ¤Ç¤¢¤Ã¤¿¡£
-.TP
-.B EINVAL
-.\"O .I flags
-.\"O contained neither
-.\"O .B MAP_PRIVATE
-.\"O or
-.\"O .BR MAP_SHARED ,
-.\"O or contained both of these values.
-.I flags
-¤Ë
-.B MAP_PRIVATE
-¤È
-.B MAP_SHARED
-¤Î¤É¤Á¤é¤â´Þ¤Þ¤ì¤Æ¤¤¤Ê¤«¤Ã¤¿¡¢¤â¤·¤¯¤Ï
-¤½¤ÎξÊý¤¬´Þ¤Þ¤ì¤Æ¤¤¤¿¡£
-.TP
-.B ENFILE
-.\"O .\" This is for shared anonymous segments
-.\" ¤³¤ì¤Ï¶¦Í­Æ¿Ì¾ (anonymous) ¥»¥°¥á¥ó¥È¤Î¤¿¤á¤Î¤â¤Î¤Ç¤¢¤ë¡£
+\fBPROT_WRITE\fP と \fBMAP_SHARED\fP の両方を指定してマップされたファイルの場合、書き込みがあると、 \fIst_ctime\fP と
+\fIst_mtime\fP の両フィールドは、マップされた領域への書き込みより後で、 \fBMS_SYNC\fP または \fBMS_ASYNC\fP フラグを指定して
+\fBmsync\fP(2)  が呼ばれる前までに更新される。
+.SH 返り値
+\fBmmap\fP()  は成功するとマップされた領域へのポインタを返す。 失敗すると値 \fBMAP_FAILED\fP (つまり \fI(void\ *)\ \-1\fP)  を返し、 \fIerrno\fP がエラーの内容にしたがってセットされる。 \fBmunmap\fP()  は成功すると 0 を返す。失敗すると \-1
+を返し、 \fIerrno\fP がセットされる (多くの場合 \fBEINVAL\fP になるだろう)。
+.SH エラー
+.TP 
+\fBEACCES\fP
+以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non\-regular file) 。 \fBMAP_PRIVATE\fP
+を要求したが \fIfd\fP は読み込み用にオープンされていない。 \fBMAP_SHARED\fP を要求して \fBPROT_WRITE\fP をセットしたが
+\fIfd\fP は読み書きモード (\fBO_RDWR\fP)  でオープンされていない、 \fBPROT_WRITE\fP をセットしたが、ファイルは追加
+(append) 専用である。
+.TP 
+\fBEAGAIN\fP
+ファイルがロックされている。またはロックされているメモリが多すぎる (\fBsetrlimit\fP(2)  を参照)。
+.TP 
+\fBEBADF\fP
+\fIfd\fP が有効なファイル記述子 (file descriptor) ではない (かつ \fBMAP_ANONYMOUS\fP がセットされていない)。
+.TP 
+\fBEINVAL\fP
+\fIaddr\fP か \fIlength\fP か \fIoffset\fP が適切でない (例えば、大きすぎるとか、ページ境界にアラインメントされていない)。
+.TP 
+\fBEINVAL\fP
+(Linux 2.6.12 以降)  \fIlength\fP が 0 であった。
+.TP 
+\fBEINVAL\fP
+\fIflags\fP に \fBMAP_PRIVATE\fP と \fBMAP_SHARED\fP のどちらも含まれていなかった、もしくは その両方が含まれていた。
+.TP 
+\fBENFILE\fP
+.\" This is for shared anonymous segments
 .\" [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
-.\"O The system limit on the total number of open files has been reached.
-¥ª¡¼¥×¥ó¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤ÎÁí¿ô¤¬¥·¥¹¥Æ¥à¤ÎÀ©¸Â¤Ë㤷¤¿¡£
 .\" .TP
 .\" .B ENOEXEC
-.\"O .\" A file could not be mapped for reading.
-.\" ¥Õ¥¡¥¤¥ë¤òÆɤ߹þ¤ßÍѤ˥ޥåפǤ­¤Ê¤«¤Ã¤¿¡£
-.TP
-.B ENODEV
-.\"O The underlying file system of the specified file does not support
-.\"O memory mapping.
-»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¤¬ÃÖ¤«¤ì¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤¬¥á¥â¥ê¥Þ¥Ã¥Ô¥ó¥°¤ò¥µ¥Ý¡¼¥È
-¤·¤Æ¤¤¤Ê¤¤¡£
-.TP
-.B ENOMEM
-.\"O No memory is available, or the process's maximum number of mappings would
-.\"O have been exceeded.
-¥á¥â¥ê¤Ë¶õ¤­¤¬¤Ê¤¤¡¢¤Þ¤¿¤Ï½èÍýÃæ¤Î¥×¥í¥»¥¹¤Î¥Þ¥Ã¥Ô¥ó¥°¿ô¤¬ºÇÂç¿ô¤òĶ²á¤·¤¿¡£
-.TP
-.B EPERM
-.\"O The
-.\"O .I prot
-.\"O argument asks for
-.\"O .B PROT_EXEC
-.\"O but the mapped area belongs to a file on a file system that
-.\"O was mounted no-exec.
-.\"O .\" (Since 2.4.25 / 2.6.0.)
-.I prot
-°ú¤­¿ô¤Ï
-.B PROT_EXEC
-¤ò¹Ô¤¦¤è¤¦¤Ë»ØÄꤵ¤ì¤Æ¤¤¤ë¤¬¡¢
-no-exec ¤Ç¥Þ¥¦¥ó¥È¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¾å¤Î¥Õ¥¡¥¤¥ë¤Ë
-¥Þ¥Ã¥×Îΰ褬Âбþ¤·¤Æ¤¤¤ë¡£
-.\" (2.4.25 / 2.6.0 °Ê¹ß)
-.TP
-.B ETXTBSY
-.\"O .B MAP_DENYWRITE
-.\"O was set but the object specified by
-.\"O .I fd
-.\"O is open for writing.
-.B MAP_DENYWRITE
-¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¤¬
-.I fd
-¤Ç»ØÄꤵ¤ì¤Æ¤¤¤ë¥ª¥Ö¥¸¥§¥¯¥È¤Ï½ñ¤­¹þ¤ßÍѤ˳«¤«¤ì¤Æ¤¤¤ë¡£
+.\" A file could not be mapped for reading.
+システム全体でオープンされているファイルの総数が上限に達した。
+.TP 
+\fBENODEV\fP
+指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート していない。
+.TP 
+\fBENOMEM\fP
+メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。
+.TP 
+\fBEPERM\fP
+.\" (Since 2.4.25 / 2.6.0.)
+\fIprot\fP 引き数は \fBPROT_EXEC\fP を行うように指定されているが、 no\-exec でマウントされたファイルシステム上のファイルに
+マップ領域が対応している。
+.TP 
+\fBETXTBSY\fP
+\fBMAP_DENYWRITE\fP がセットされているが \fIfd\fP で指定されているオブジェクトは書き込み用に開かれている。
+.TP 
+\fBEOVERFLOW\fP
+On 32\-bit architecture together with the large file extension (i.e., using
+64\-bit \fIoff_t\fP): the number of pages used for \fIlength\fP plus number of
+pages used for \fIoffset\fP would overflow \fIunsigned long\fP (32 bits).
 .LP
-.\"O Use of a mapped region can result in these signals:
-¥Þ¥Ã¥×Îΰè¤òÍøÍѤ¹¤ëºÝ¤Ë¡¢°Ê²¼¤Î¥·¥°¥Ê¥ë¤¬È¯À¸¤¹¤ë¤³¤È¤¬¤¢¤ë:
-.TP
-.B SIGSEGV
-.\"O Attempted write into a region mmaped as read-only.
-Æɤ߹þ¤ßÀìÍѤǠmmap ¤µ¤ì¤¿Îΰè¤Ø½ñ¤­¹þ¤ß¤ò¹Ô¤ª¤¦¤È¤·¤¿¡£
-.TP
-.B SIGBUS
-.\"O Attempted access to a portion of the buffer that does not correspond
-.\"O to the file (for example, beyond the end of the file, including the
-.\"O case where another process has truncated the file).
-¥Ð¥Ã¥Õ¥¡¤Î¤¦¤Á¡¢¥Õ¥¡¥¤¥ë¤Ë´ØÏ¢¤Å¤±¤é¤ì¤Æ¤¤¤Ê¤¤Éôʬ
-(Î㤨¤Ð¥Õ¥¡¥¤¥ëËöÈø¤ò±Û¤¨¤¿Éôʬ¤Ê¤É¡£¤³¤ì¤Ë¤Ï
-¾¤Î¥×¥í¥»¥¹¤¬¥Õ¥¡¥¤¥ë¤òÀÚ¤êµÍ¤á¤¿¾ì¹ç¤Ê¤É¤â´Þ¤Þ¤ì¤ë)
-¤Ë¥¢¥¯¥»¥¹¤·¤è¤¦¤È¤·¤¿¡£
-.\"O .SH "CONFORMING TO"
-.SH ½àµò
-.\"O SVr4, 4.4BSD, POSIX.1-2001.
-.\"O .\" SVr4 documents additional error codes ENXIO and ENODEV.
-.\"O .\" SUSv2 documents additional error codes EMFILE and EOVERFLOW.
-SVr4, 4.4BSD, POSIX.1-2001.
-.\" SVr4 ¤Ë¤Ï¤µ¤é¤Ë ENXIO ¤È ENODEV ¤Î¥¨¥é¡¼¥³¡¼¥É¤Ë¤Ä¤¤¤Æ¤Îµ­½Ò¤¬¤¢¤ë¡£
-.\" SUSv2 ¤Ë¤Ï¤µ¤é¤Ë EMFILE ¤È EOVERFLOW ¤Î¥¨¥é¡¼¥³¡¼¥É¤Ë¤Ä¤¤¤Æ¤Îµ­½Ò¤¬¤¢¤ë¡£
-.\"O .SH AVAILABILITY
-.SH ²ÄÍÑÀ­
-.\"O On POSIX systems on which
-.\"O .BR mmap (),
-.\"O .BR msync (2)
-.\"O and
-.\"O .BR munmap ()
-.\"O are available,
-.\"O .B _POSIX_MAPPED_FILES
-.\"O is defined in \fI<unistd.h>\fP to a value greater than 0.
-.\"O (See also
-.\"O .BR sysconf (3).)
-.\"O .\" POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
-.\"O .\" -1: unavailable, 0: ask using sysconf().
-.\"O .\" glibc defines it to 1.
-.BR mmap (),
-.BR msync (2)
-.BR munmap ()
-¤¬ÍøÍѲÄǽ¤Ê POSIX ¥·¥¹¥Æ¥à¤Ç¤Ï¡¢
-.B _POSIX_MAPPED_FILES
-¤Ï <unistd.h> ¤Ç 0 ¤è¤êÂ礭¤ÊÃͤËÄêµÁ¤µ¤ì¤ë
-.RB ( sysconf (3)
-¤â»²¾È¤Î¤³¤È)¡£
-.\" POSIX.1-2001: _POSIX_MAPPED_FILES ¤Ï -1 ¤« 0 ¤« 200112L ¤Î
-.\" ¤¤¤º¤ì¤«¤ËÄêµÁ¤µ¤ì¤ë¤³¤È¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£
-.\" -1: ÍøÍÑÉԲġ¢0: sysconf() ¤ËÌ䤤¤¢¤ï¤»¤ë
-.\" glibc ¤Ç¤Ï POSIX_MAPPED_FILES ¤Ï 1 ¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
-.\"O .SH NOTES
-.SH Ãí°Õ
-.\"O Since kernel 2.4, this system call has been superseded by
-.\"O .BR mmap2 (2).
-.\"O Nowadays,
-.\"O .\" Since around glibc 2.1/2.2, depending on the platform.
-.\"O the glibc
-.\"O .BR mmap ()
-.\"O wrapper function invokes
-.\"O .BR mmap2 (2)
-.\"O with a suitably adjusted value for
-.\"O .IR offset .
-¥«¡¼¥Í¥ë 2.4 °Ê¹ß¡¢¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï
-.BR mmap2 (2)
-¤Ë¼è¤Ã¤ÆÂå¤ï¤é¤ì¤¿¡£
-¸½ºß¤Ç¤Ï¡¢
-.\" ¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Ë¤è¤ê°Û¤Ê¤ë¤¬¡¢ glibc 2.1/2.2 ¤¢¤¿¤ê¤«¤é¡£
-glibc ¤Î
-.BR mmap ()
-¤Î¥é¥Ã¥Ñ¡¼´Ø¿ô¤Ï
-.I offset
-¤òŬÀÚ¤ËÄ´À°¤·¤Æ¤«¤é
-.BR mmap2 (2)
-¤òµ¯Æ°¤¹¤ë¡£
+マップ領域を利用する際に、以下のシグナルが発生することがある:
+.TP 
+\fBSIGSEGV\fP
+読み込み専用で mmap された領域へ書き込みを行おうとした。
+.TP 
+\fBSIGBUS\fP
+バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越えた部分など。これには
+他のプロセスがファイルを切り詰めた場合なども含まれる)  にアクセスしようとした。
+.SH 準拠
+.\" SVr4 documents additional error codes ENXIO and ENODEV.
+.\" SUSv2 documents additional error codes EMFILE and EOVERFLOW.
+SVr4, 4.4BSD, POSIX.1\-2001.
+.SH 可用性
+.\" POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
+.\" -1: unavailable, 0: ask using sysconf().
+.\" glibc defines it to 1.
+\fBmmap\fP(), \fBmsync\fP(2)  \fBmunmap\fP()  が利用可能な POSIX システムでは、
+\fB_POSIX_MAPPED_FILES\fP は <unistd.h> で 0 より大きな値に定義される (\fBsysconf\fP(3)
+も参照のこと)。
+.SH 注意
+.\" Since around glibc 2.1/2.2, depending on the platform.
+このページでは glibc の \fBmmap\fP() のラッパー関数が提供するインターフェースに
+ついて説明している。元々は、この関数は同じ名前のシステムコールを起動していた。
+カーネル 2.4 以降、このシステムコールは \fBmmap2\fP(2) に取って代わられ、現在
+では、 glibc の \fBmmap\fP() のラッパー関数は \fIoffset\fP を適切に調整してから
+\fBmmap2\fP(2) を起動する。
 
-.\"O On some hardware architectures (e.g., i386),
-.\"O .B PROT_WRITE
-.\"O implies
-.\"O .BR PROT_READ .
-.\"O It is architecture dependent whether
-.\"O .B PROT_READ
-.\"O implies
-.\"O .B PROT_EXEC
-.\"O or not.
-.\"O Portable programs should always set
-.\"O .B PROT_EXEC
-.\"O if they intend to execute code in the new mapping.
-(i386 ¤Ê¤É¤Î) ¤¤¤¯¤Ä¤«¤Î¥¢¡¼¥­¥Æ¥¯¥Á¥ã¤Ç¤Ï¡¢
-.B PROT_WRITE
-¤ò¥»¥Ã¥È¤¹¤ë¤È¡¢°ÅÌۤΤ¦¤Á¤Ë
-.B PROT_READ
-¤¬¥»¥Ã¥È¤µ¤ì¤ë¡£
-.B PROT_READ
-¤ò¥»¥Ã¥È¤·¤¿ºÝ¤Ë°ÅÌۤΤ¦¤Á¤Ë
-.B PROT_EXEC
-¤¬¥»¥Ã¥È¤µ¤ì¤ë¤«¤É¤¦¤«¤Ï¡¢¥¢¡¼¥­¥Æ¥¯¥Á¥ã°Í¸¤Ç¤¢¤ë¡£
-°Ü¿¢À­¤ò¹Íθ¤·¤¿¥×¥í¥°¥é¥à¤Ç¤Ï¡¢
-¿·µ¬¤Ë¥Þ¥Ã¥×¤·¤¿Îΰè¤Ç¥³¡¼¥É¤ò¼Â¹Ô¤·¤¿¤¤¾ì¹ç¤Ï¡¢¾ï¤Ë
-.B PROT_EXEC
-¤ò¥»¥Ã¥È¤¹¤Ù¤­¤Ç¤¢¤ë¡£
+(i386 などの) いくつかのアーキテクチャでは、 \fBPROT_WRITE\fP をセットすると、暗黙のうちに \fBPROT_READ\fP
+がセットされる。 \fBPROT_READ\fP をセットした際に暗黙のうちに \fBPROT_EXEC\fP がセットされるかどうかは、アーキテクチャ依存である。
+移植性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、常に \fBPROT_EXEC\fP をセットすべきである。
 
-.\"O The portable way to create a mapping is to specify
-.\"O .I addr
-.\"O as 0 (NULL), and omit
-.\"O .B MAP_FIXED
-.\"O from
-.\"O .IR flags .
-.\"O In this case, the system chooses the address for the mapping;
-.\"O the address is chosen so as not to conflict with any existing mapping,
-.\"O and will not be 0.
-.\"O If the
-.\"O .B MAP_FIXED
-.\"O flag is specified, and
-.\"O .I addr
-.\"O is 0 (NULL), then the mapped address will be 0 (NULL).
-¥Þ¥Ã¥Ô¥ó¥°¤òºîÀ®¤¹¤ë°Ü¿¢À­¤Î¤¢¤ëÊýË¡¤Ï¡¢
-.I addr
-¤Ë 0 (NULL) ¤ò»ØÄꤷ¡¢
-.I flags
-¤«¤é
-.B MAP_FIXED
-¤ò³°¤¹¤³¤È¤Ç¤¢¤ë¡£
-¤³¤Î¾ì¹ç¡¢¥·¥¹¥Æ¥à¤¬¥Þ¥Ã¥Ô¥ó¥°ÍѤΥ¢¥É¥ì¥¹¤ÎÁªÂò¤ò¹Ô¤¦¡£
-¥¢¥É¥ì¥¹¤Ï´û¸¤Î¥Þ¥Ã¥Ô¥ó¥°¤È¾×Æͤ·¤Ê¤¤¤è¤¦¤Ë¡¢
-¤«¤Ä 0 ¤Ë¤Ê¤é¤Ê¤¤¤è¤¦¤ËÁªÂò¤µ¤ì¤ë¡£
-.B MAP_FIXED
-¥Õ¥é¥°¤¬»ØÄꤵ¤ì¡¢¤«¤Ä
-.I addr
-¤¬ 0 (NULL)
-¤Î¾ì¹ç¤Ë¤Ï¡¢¥Þ¥Ã¥×¤µ¤ì¤ë¥¢¥É¥ì¥¹¤¬ 0 (NULL) ¤Ë¤Ê¤ë¡£
-.\"O .SH BUGS
-.SH ¥Ð¥°
-.\"O On Linux there are no guarantees like those suggested above under
-.\"O .BR MAP_NORESERVE .
-.\"O By default, any process can be killed
-.\"O at any moment when the system runs out of memory.
-Linux ¤Ë¤ª¤¤¤Æ¤Ï¡¢¾åµ­¤Î
-.B MAP_NORESERVE
-¤Ç½Ò¤Ù¤é¤ì¤Æ¤¤¤ë¤è¤¦¤ÊÊݾڤϤʤ¤¡£
-¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢¥·¥¹¥Æ¥à¤¬¥á¥â¥ê¤ò»È¤¤Àڤ俾ì¹ç¤Ë¤Ï¡¢
-¤É¤Î¥×¥í¥»¥¹¤¬¤¤¤Ä¶¯À©½ªÎ»¤µ¤ì¤ë¤«Ê¬¤«¤é¤Ê¤¤¤«¤é¤Ç¤¢¤ë¡£
+マッピングを作成する移植性のある方法は、 \fIaddr\fP に 0 (NULL) を指定し、 \fIflags\fP から \fBMAP_FIXED\fP
+を外すことである。 この場合、システムがマッピング用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 かつ 0
+にならないように選択される。 \fBMAP_FIXED\fP フラグが指定され、かつ \fIaddr\fP が 0 (NULL)
+の場合には、マップされるアドレスが 0 (NULL) になる。
 
-.\"O In kernels before 2.6.7, the
-.\"O .B MAP_POPULATE
-.\"O flag only has effect if
-.\"O .I prot
-.\"O is specified as
-.\"O .BR PROT_NONE .
-2.6.7 ¤è¤êÁ°¤Î¥«¡¼¥Í¥ë¤Ç¤Ï¡¢
-.I prot
-¤Ë
-.B PROT_NONE
-¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¤Ë¤Î¤ß¡¢
-.B MAP_POPULATE
-¥Õ¥é¥°¤¬¸úÎϤò»ý¤Ä¡£
+Certain \fIflags\fP constants are defined only if either \fB_BSD_SOURCE\fP or
+\fB_SVID_SOURCE\fP is defined.  (Requiring \fB_GNU_SOURCE\fP also suffices, and
+requiring that macro specifically would have been more logical, since these
+flags are all Linux specific.)  The relevant flags are: \fBMAP_32BIT\fP,
+\fBMAP_ANONYMOUS\fP (and the synonym \fBMAP_ANON\fP), \fBMAP_DENYWRITE\fP,
+\fBMAP_EXECUTABLE\fP, \fBMAP_FILE\fP, \fBMAP_GROWSDOWN\fP, \fBMAP_HUGETLB\fP,
+\fBMAP_LOCKED\fP, \fBMAP_NONBLOCK\fP, \fBMAP_NORESERVE\fP, \fBMAP_POPULATE\fP, and
+\fBMAP_STACK\fP.
+.SH バグ
+Linux においては、上記の \fBMAP_NORESERVE\fP で述べられているような保証はない。
+デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制終了されるか分からないからである。
 
-.\"O SUSv3 specifies that
-.\"O .BR mmap ()
-.\"O should fail if
-.\"O .I length
-.\"O is 0.
-.\"O However, in kernels before 2.6.12,
-.\"O .BR mmap ()
-.\"O succeeded in this case: no mapping was created and the call returned
-.\"O .IR addr .
-.\"O Since kernel 2.6.12,
-.\"O .BR mmap ()
-.\"O fails with the error
-.\"O .B EINVAL
-.\"O for this case.
-SUSv3 ¤Ç¤Ï¡¢
-.I length
-¤¬ 0 ¤Î¾ì¹ç¡¢
-.BR mmap ()
-¤Ï¼ºÇÔ¤¹¤ë¤Èµ¬Äꤵ¤ì¤Æ¤¤¤ë¡£¤·¤«¤·¤Ê¤¬¤é¡¢2.6.12 ¤è¤êÁ°¤Î¥«¡¼¥Í¥ë¤Ç¤Ï¡¢
-¤³¤Î¾ì¹ç¤Ë
-.BR mmap ()
-¤ÏÀ®¸ù¤·¤Æ¤¤¤¿ (¥Þ¥Ã¥Ô¥ó¥°¤ÏºîÀ®¤µ¤ì¤º¡¢
-.I addr
-¤¬ÊÖ¤µ¤ì¤Æ¤¤¤¿)¡£
-¥«¡¼¥Í¥ë 2.6.12 °Ê¹ß¤Ç¤Ï¡¢
-.BR mmap ()
-¤Ï¥¨¥é¡¼
-.B EINVAL
-¤Ç¼ºÇÔ¤¹¤ë¡£
-.\"O .SH EXAMPLE
-.SH Îã
+2.6.7 より前のカーネルでは、 \fIprot\fP に \fBPROT_NONE\fP が指定された場合にのみ、 \fBMAP_POPULATE\fP
+フラグが効力を持つ。
+
+SUSv3 では、 \fIlength\fP が 0 の場合、 \fBmmap\fP()  は失敗すると規定されている。しかしながら、2.6.12
+より前のカーネルでは、 この場合に \fBmmap\fP()  は成功していた (マッピングは作成されず、 \fIaddr\fP が返されていた)。 カーネル
+2.6.12 以降では、 \fBmmap\fP()  はエラー \fBEINVAL\fP で失敗する。
+
+POSIX specifies that the system shall always zero fill any partial page at
+the end of the object and that system will never write any modification of
+the object beyond its end.  On Linux, when you write data to such partial
+page after the end of the object, the data stays in the page cache even
+after the file is closed and unmapped and even though the data is never
+written to the file itself, subsequent mappings may see the modified
+content.  In some cases, this could be fixed by calling \fBmsync\fP(2)  before
+the unmap takes place; however, this doesn't work on tmpfs (for example,
+when using POSIX shared memory interface documented in \fBshm_overview\fP(7)).
+.SH 例
 .\" FIXME . Add an example here that uses an anonymous shared region for
 .\" IPC between parent and child.
 .PP
-.\"O The following program prints part of the file specified in
-.\"O its first command-line argument to standard output.
-.\"O The range of bytes to be printed is specified via offset and length
-.\"O values in the second and third command-line arguments.
-.\"O The program creates a memory mapping of the required
-.\"O pages of the file and then uses
-.\"O .BR write (2)
-.\"O to output the desired bytes.
-°Ê²¼¤Î¥×¥í¥°¥é¥à¤Ï¡¢°ìÈÖÌܤΥ³¥Þ¥ó¥É¥é¥¤¥ó°ú¤­¿ô¤Ç»ØÄꤵ¤ì¤¿
-¥Õ¥¡¥¤¥ë¤Î°ìÉô¤òɸ½à½ÐÎϤËɽ¼¨¤¹¤ë¡£
-ɽ¼¨¤¹¤ëÈϰϤϡ¢ÆóÈÖÌÜ¡¢»°ÈÖÌܤΥ³¥Þ¥ó¥É¥é¥¤¥ó°ú¤­¿ô¤ÇÅϤµ¤ì¤ë
-¥ª¥Õ¥»¥Ã¥È¤ÈŤµ¤Ç»ØÄꤵ¤ì¤ë¡£
-¤³¤Î¥×¥í¥°¥é¥à¤Ï¡¢»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¤ÎɬÍפʥڡ¼¥¸¤Î¥á¥â¥ê¡¦
-¥Þ¥Ã¥Ô¥ó¥°¤òºîÀ®¤·¡¢
-.BR write (2)
-¤ò»È¤Ã¤Æ½ê˾¤Î¥Ð¥¤¥È¤ò½ÐÎϤ¹¤ë¡£
+以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を標準出力に表示する。
+表示する範囲は、二番目、三番目のコマンドライン引き数で渡される オフセットと長さで指定される。
+このプログラムは、指定されたファイルの必要なページのメモリ・ マッピングを作成し、 \fBwrite\fP(2)  を使って所望のバイトを出力する。
 .nf
 
 #include <sys/mman.h>
@@ -1033,7 +347,7 @@ SUSv3 
 #include <stdlib.h>
 #include <unistd.h>
 
-#define handle_error(msg) \\
+#define handle_error(msg) \e
     do { perror(msg); exit(EXIT_FAILURE); } while (0)
 
 int
@@ -1047,7 +361,7 @@ main(int argc, char *argv[])
     ssize_t s;
 
     if (argc < 3 || argc > 4) {
-        fprintf(stderr, "%s file offset [length]\\n", argv[0]);
+        fprintf(stderr, "%s file offset [length]\en", argv[0]);
         exit(EXIT_FAILURE);
     }
 
@@ -1063,7 +377,7 @@ main(int argc, char *argv[])
         /* offset for mmap() must be page aligned */
 
     if (offset >= sb.st_size) {
-        fprintf(stderr, "offset is past end of file\\n");
+        fprintf(stderr, "offset is past end of file\en");
         exit(EXIT_FAILURE);
     }
 
@@ -1092,27 +406,21 @@ main(int argc, char *argv[])
     }
 
     exit(EXIT_SUCCESS);
-} /* main */
+}
 .fi
-\"O .SH "SEE ALSO"
-.SH ´ØÏ¢¹àÌÜ
-.BR getpagesize (2),
-.BR mincore (2),
-.BR mlock (2),
-.BR mmap2 (2),
-.BR mprotect (2),
-.BR mremap (2),
-.BR msync (2),
-.BR remap_file_pages (2),
-.BR setrlimit (2),
-.BR shmat (2),
-.BR shm_open (3),
-.BR shm_overview (7)
-.br
-B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391.
+.SH 関連項目
+\fBgetpagesize\fP(2), \fBmincore\fP(2), \fBmlock\fP(2), \fBmmap2\fP(2), \fBmprotect\fP(2),
+\fBmremap\fP(2), \fBmsync\fP(2), \fBremap_file_pages\fP(2), \fBsetrlimit\fP(2),
+\fBshmat\fP(2), \fBshm_open\fP(3), \fBshm_overview\fP(7)
+
+\fBproc\fP(5) の \fI/proc/[pid]/maps\fP, \fI/proc/[pid]/map_files\fP,
+\fI/proc/[pid]/smaps\fP の説明。
+
 .\"
-.\"O .\" Repeat after me: private read-only mappings are 100% equivalent to
-.\"O .\" shared read-only mappings. No ifs, buts, or maybes. -- Linus
-.\" »ä¤Î¸å¤Ë¤Ä¤¤¤Æ¸À¤Ã¤Æ¤ß¤Æ: ¥×¥é¥¤¥Ù¡¼¥È¤ÊÆɤ߹þ¤ßÀìÍѤΥޥåԥ󥰤Ï
-.\" ¶¦Í­¤µ¤ì¤¿Æɤ߹þ¤ßÀìÍѤΥޥåԥ󥰤Ƞ100% Åù¤·¤¤¡£
-.\" ¡Ö¤â¤·¡×¤â¡Ö¤·¤«¤·¡×¤â¡Ö¤¿¤Ö¤ó¡×¤â¤Ê¤¤¡£-- Linus
+.\" Repeat after me: private read-only mappings are 100% equivalent to
+.\" shared read-only mappings. No ifs, buts, or maybes. -- Linus
+B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128\-129 and 389\-391.
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。