2 .\" Hey Emacs! This file is -*- nroff -*- source.
4 .\" Copyright (C) 2008, Linux Foundation, written by Michael Kerrisk
5 .\" <mtk.manpages@gmail.com>
7 .\" Permission is granted to make and distribute verbatim copies of this
8 .\" manual provided the copyright notice and this permission notice are
9 .\" preserved on all copies.
11 .\" Permission is granted to copy and distribute modified versions of this
12 .\" manual under the conditions for verbatim copying, provided that the
13 .\" entire resulting derived work is distributed under the terms of a
14 .\" permission notice identical to this one.
16 .\" Since the Linux kernel and libraries are constantly changing, this
17 .\" manual page may be incorrect or out-of-date. The author(s) assume no
18 .\" responsibility for errors or omissions, or for damages resulting from
19 .\" the use of the information contained herein. The author(s) may not
20 .\" have taken the same level of care in the production of this manual,
21 .\" which is licensed free of charge, as they might when working
24 .\" Formatted or processed versions of this manual, if unaccompanied by
25 .\" the source, must acknowledge the copyright and authors of this work.
27 .\" Japanese Version Copyright (c) 2008 Akihiro MOTOKI
28 .\" all rights reserved.
29 .\" Translated 2008-08-21, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.04
31 .TH SHM_OVERVIEW 7 2010-09-10 "Linux" "Linux Programmer's Manual"
34 .\"O shm_overview \- Overview of POSIX shared memory
35 shm_overview \- POSIX 共有メモリの概要
38 .\"O The POSIX shared memory API allows processes to communicate information
39 .\"O by sharing a region of memory.
40 POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、
41 プロセス間で情報をやり取りすることができる。
43 .\"O The interfaces employed in the API are:
44 この API では以下のインターフェースが採用されている。
47 .\"O Create and open a new object, or open an existing object.
48 .\"O This is analogous to
50 .\"O The call returns a file descriptor for use by the other
51 .\"O interfaces listed below.
52 新しいオブジェクトを生成しオープンする、もしくは
55 と同じである。下記にある他のインターフェースで使用する
59 .\"O Set the size of the shared memory object.
60 .\"O (A newly created shared memory object has a length of zero.)
64 .\"O Map the shared memory object into the virtual address space
65 .\"O of the calling process.
66 呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを
70 .\"O Unmap the shared memory object from the virtual address space
71 .\"O of the calling process.
76 .\"O Remove a shared memory object name.
80 .\"O Close the file descriptor allocated by
82 .\"O when it is no longer needed.
84 で割り当てられたファイルディスクリプタが不要になった際に、
90 .\"O structure that describes the shared memory object.
91 .\"O Among the information returned by this call are the object's
100 その共有メモリオブジェクトについての情報が入った
103 このシステムコールが返す情報には、オブジェクトのサイズ
114 .\"O To change the ownership of a shared memory object.
115 共有メモリオブジェクトの所有権を変更する。
118 .\"O To change the permissions of a shared memory object.
119 共有メモリオブジェクトの許可属性を変更する。
122 .\"O POSIX shared memory is supported since Linux 2.4 and glibc 2.2.
123 POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。
126 .\"O POSIX shared memory objects have kernel persistence:
127 .\"O a shared memory object will exist until the system is shut down,
128 .\"O or until all processes have unmapped the object and it has been deleted with
129 .\"O .BR shm_unlink (3)
130 POSIX 共有メモリオブジェクトはカーネル内で保持される。
131 共有メモリオブジェクトは、システムがシャットダウンされるか、
132 全てのプロセスがそのオブジェクトをアンマップし、
137 .\"O Programs using the POSIX shared memory API must be compiled with
139 .\"O to link against the real-time library,
141 POSIX 共有メモリ API を使用したプログラムは
146 .\"O .SS Accessing shared memory objects via the file system
147 .SS ファイルシステム経由での共有メモリオブジェクトへのアクセス
148 .\"O On Linux, shared memory objects are created in a
150 .\"O virtual file system, normally mounted under
152 .\"O Since kernel 2.6.19, Linux supports the use of access control lists (ACLs)
153 .\"O to control the permissions of objects in the virtual file system.
154 Linux では、共有メモリオブジェクトは通常
159 カーネル 2.6.19 以降の Linux では、
160 仮想ファイルシステム内のオブジェクトの許可属性の制御に、
161 アクセス制御リスト (ACL; access control lists) を使うことができる。
162 .\"O .SH "CONFORMING TO"
167 .\"O Typically, processes must synchronize their access to a shared
168 .\"O memory object, using, for example, POSIX semaphores.
169 通常は、共有メモリオブジェクトにアクセスするプロセスは、
170 POSIX セマフォなどを使ってプロセス間で同期をとらなければならない。
172 .\"O System V shared memory
173 .\"O .RB ( shmget (2),
175 .\"O etc.) is an older shared memory API.
176 .\"O POSIX shared memory provides a simpler, and better designed interface;
177 .\"O on the other hand POSIX shared memory is somewhat less widely available
178 .\"O (especially on older systems) than System V shared memory.
182 など) は古い共有メモリ API である。
183 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供している。
184 一方で、POSIX 共有メモリは System V 共有メモリと比べると
185 利用できるシステムが少ない (特に、古いシステムでは少ない)。