OSDN Git Service

(split) LDP: Translation snapshots for ja.po.
[linuxjm/LDP_man-pages.git] / draft / man2 / mmap2.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright (C) 2002, Michael Kerrisk
4 .\"
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"
25 .\" Modified 31 Jan 2002, Michael Kerrisk <mtk.manpages@gmail.com>
26 .\"     Added description of mmap2
27 .\" Modified, 2004-11-25, mtk -- removed stray #endif in prototype
28 .\"
29 .\" Japanese Version Copyright (c) 2002 Yuichi SATO
30 .\"         all rights reserved.
31 .\" Translated 2002-07-18, Yuichi SATO <ysato@h4.dion.ne.jp>
32 .\" Updated & Modified 2003-09-06, Yuichi SATO <ysato444@yahoo.co.jp>
33 .\" Updated 2006-01-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
34 .\" Updated 2007-09-07, Akihiro MOTOKI, LDP v2.64
35 .\"
36 .TH MMAP2 2 2008-04-22 "Linux" "Linux Programmer's Manual"
37 .\"O .SH NAME
38 .SH 名前
39 .\"O mmap2 \- map files or devices into memory
40 mmap2 \- ファイルやデバイスをメモリにマップする
41 .\"O .SH SYNOPSIS
42 .SH 書式
43 .nf
44 .B #include <sys/mman.h>
45 .sp
46 .BI "void *mmap2(void *" addr ", size_t " length ", int " prot ,
47 .BI "            int " flags ", int " fd ", off_t " pgoffset );
48 .fi
49 .\"O .SH DESCRIPTION
50 .SH 説明
51 .\"O The
52 .\"O .BR mmap2 ()
53 .\"O system call operates in exactly the same way as
54 .\"O .BR mmap (2),
55 .BR mmap2 ()
56 システムコールは
57 .BR mmap (2)
58 と全く同じように動作する。
59 .\"O except that the final argument specifies the offset into the
60 .\"O file in 4096-byte units (instead of bytes, as is done by
61 .\"O .BR mmap (2)).
62 ただし最後の引き数には、ファイルのオフセットを
63 .RB ( mmap (2)
64 が行っている、バイト単位ではなく)
65 4096 バイトを単位として指定する。
66 .\"O This enables applications that use a 32-bit
67 .\"O .I off_t
68 .\"O to map large files (up to 2^44 bytes).
69 これにより、32 ビットの
70 .I off_t
71 を使うアプリケーションで (2^44 バイトまでの)
72 大きなファイルをマップできるようになる。
73 .\"O .SH "RETURN VALUE"
74 .SH 返り値
75 .\"O On success,
76 .\"O .BR mmap2 ()
77 .\"O returns a pointer to the mapped area.
78 .\"O On error \-1 is returned and
79 .\"O .I errno
80 .\"O is set appropriately.
81 成功した場合、
82 .BR mmap2 ()
83 はマップされた領域へのポインタを返す。
84 エラーの場合は \-1 が返されて、
85 .I errno
86 が適切に設定される。
87 .\"O .SH ERRORS
88 .SH エラー
89 .TP
90 .B EFAULT
91 .\"O Problem with getting the data from userspace.
92 ユーザ空間からデータを取得するときに問題があった。
93 .TP
94 .B EINVAL
95 .\"O (Various platforms where the page size is not 4096 bytes.)
96 .\"O .I offset * 4096
97 .\"O is not a multiple of the system page size.
98 (ページサイズが 4096 バイトでないプラットフォームにおいて)
99 .I offset * 4096
100 がシステムのページサイズの倍数ではない。
101 .PP
102 .\"O .BR mmap2 ()
103 .\"O can return any of the same errors as
104 .\"O .BR mmap (2).
105 .BR mmap2 ()
106
107 .BR mmap (2)
108 と同じエラーを返すことができる。
109 .\"O .SH VERSIONS
110 .SH バージョン
111 .\"O .BR mmap2 ()
112 .\"O is available since Linux 2.3.31.
113 .BR mmap2 ()
114 は、Linux 2.3.31 以降で使用可能である。
115 .\"O .SH "CONFORMING TO"
116 .SH 準拠
117 .\"O This system call is Linux-specific.
118 このシステムコールは Linux 独自である。
119 .\"O .SH NOTES
120 .SH 注意
121 .\"O Nowadays, the glibc
122 .\"O .BR mmap ()
123 .\"O wrapper function invokes this system call rather than the
124 .\"O .BR mmap (2)
125 .\"O system call.
126 現在では、glibc の
127 .BR mmap ()
128 のラッパー関数は、
129 .BR mmap (2)
130 システムコールではなく、このシステムコール
131 .RB ( mmap2 (2))
132 を起動する。
133
134 .\"O On ia64, the unit for
135 .\"O .I offset
136 .\"O is actually the system page size, rather than 4096 bytes.
137 ia64 では、
138 .I offset
139 の単位は、実際にはシステムのページサイズであり、
140 4096 バイトではない。
141 .\" ia64 can have page sizes ranging from 4kB to 64kB.
142 .\" On cris, it looks like the unit might also be the page size,
143 .\" which is 8192 bytes. -- mtk, June 2007
144 .\"O .SH "SEE ALSO"
145 .SH 関連項目
146 .BR getpagesize (2),
147 .BR mmap (2),
148 .BR mremap (2),
149 .BR msync (2),
150 .BR shm_open (3)