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"
33 shm_overview \- POSIX 共有メモリの概要
35 POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、
36 プロセス間で情報をやり取りすることができる。
38 この API では以下のインターフェースが採用されている。
41 新しいオブジェクトを生成しオープンする、もしくは
44 と同じである。下記にある他のインターフェースで使用する
51 呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを
63 で割り当てられたファイルディスクリプタが不要になった際に、
67 その共有メモリオブジェクトについての情報が入った
70 このシステムコールが返す情報には、オブジェクトのサイズ
84 共有メモリオブジェクトの許可属性を変更する。
86 POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。
88 POSIX 共有メモリオブジェクトはカーネル内で保持される。
89 共有メモリオブジェクトは、システムがシャットダウンされるか、
90 全てのプロセスがそのオブジェクトをアンマップし、
94 POSIX 共有メモリ API を使用したプログラムは
99 .SS ファイルシステム経由での共有メモリオブジェクトへのアクセス
100 Linux では、共有メモリオブジェクトは通常
105 カーネル 2.6.19 以降の Linux では、
106 仮想ファイルシステム内のオブジェクトの許可属性の制御に、
107 アクセス制御リスト (ACL; access control lists) を使うことができる。
111 通常は、共有メモリオブジェクトにアクセスするプロセスは、
112 POSIX セマフォなどを使ってプロセス間で同期をとらなければならない。
117 など) は古い共有メモリ API である。
118 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供している。
119 一方で、POSIX 共有メモリは System V 共有メモリと比べると
120 利用できるシステムが少ない (特に、古いシステムでは少ない)。