📄 linux环境进程间通信(五) 共享内存(下).htm
字号:
<TD><A class=masthead-mainlink
href="http://www.ibm.com/support/cn/">支持与下载</A></TD>
<TD class=masthead-divider
width=27> </TD>
<TD><A class=masthead-mainlink
href="http://www.ibm.com/account/cn/">个性化服务</A></TD>
<TD><SPAN
class=spacer> </SPAN></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><!--
<script src="//www.ibm.com/common/v14/pmh.js" language="JavaScript" type="text/javascript"></script>
--><!-- end masthead dw liquid --><!--MASTHEAD_END--><!-- CMA ID for this content is: 21240 -->
<TABLE id=v14-body-table cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR vAlign=top><!--LEFTNAV_BEGIN-->
<TD id=navigation width=150>
<TABLE cellSpacing=0 cellPadding=0 width=150 border=0>
<TBODY>
<TR>
<TD class=left-nav-spacer><A class=left-nav-overview
href="http://www.ibm.com/developerworks/cn/"> </A></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=150 border=0>
<TBODY>
<TR>
<TD class=left-nav-overview colSpan=2><A class=left-nav-overview
href="http://www.ibm.com/developerworks/cn/">developerWorks<BR>中国</A></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=150 border=0>
<TBODY>
<TR>
<TD class=left-nav-highlight colSpan=2><A class=left-nav
href="http://www.ibm.com/developerworks/cn/linux/l-ipc/part5/index2.html#">本文内容包括:</A></TD></TR>
<TR class=left-nav-child-highlight>
<TD><IMG height=8 alt=""
src="Linux环境进程间通信(五) 共享内存(下).files/cl-bullet.gif" width=2></TD>
<TD><A class=left-nav-child
href="http://www.ibm.com/developerworks/cn/linux/l-ipc/part5/index2.html#1">1、系统V共享内存原理</A></TD></TR>
<TR class=left-nav-child-highlight>
<TD><IMG height=8 alt=""
src="Linux环境进程间通信(五) 共享内存(下).files/cl-bullet.gif" width=2></TD>
<TD><A class=left-nav-child
href="http://www.ibm.com/developerworks/cn/linux/l-ipc/part5/index2.html#2">2、系统V共享内存API</A></TD></TR>
<TR class=left-nav-child-highlight>
<TD><IMG height=8 alt=""
src="Linux环境进程间通信(五) 共享内存(下).files/cl-bullet.gif" width=2></TD>
<TD><A class=left-nav-child
href="http://www.ibm.com/developerworks/cn/linux/l-ipc/part5/index2.html#3">3、系统V共享内存限制</A></TD></TR>
<TR class=left-nav-child-highlight>
<TD><IMG height=8 alt=""
src="Linux环境进程间通信(五) 共享内存(下).files/cl-bullet.gif" width=2></TD>
<TD><A class=left-nav-child
href="http://www.ibm.com/developerworks/cn/linux/l-ipc/part5/index2.html#4">4、系统V共享内存范例</A></TD></TR>
<TR class=left-nav-child-highlight>
<TD><IMG height=8 alt=""
src="Linux环境进程间通信(五) 共享内存(下).files/cl-bullet.gif" width=2></TD>
<TD><A class=left-nav-child
href="http://www.ibm.com/developerworks/cn/linux/l-ipc/part5/index2.html#5">结论:</A></TD></TR>
<TR class=left-nav-child-highlight>
<TD><IMG height=8 alt=""
src="Linux环境进程间通信(五) 共享内存(下).files/cl-bullet.gif" width=2></TD>
<TD><A class=left-nav-child
href="http://www.ibm.com/developerworks/cn/linux/l-ipc/part5/index2.html#resources">参考资料
</A></TD></TR>
<TR class=left-nav-child-highlight>
<TD><IMG height=8 alt=""
src="Linux环境进程间通信(五) 共享内存(下).files/cl-bullet.gif" width=2></TD>
<TD><A class=left-nav-child
href="http://www.ibm.com/developerworks/cn/linux/l-ipc/part5/index2.html#author">关于作者</A></TD></TR>
<TR class=left-nav-child-highlight>
<TD><IMG height=8 alt=""
src="Linux环境进程间通信(五) 共享内存(下).files/cl-bullet.gif" width=2></TD>
<TD><A class=left-nav-child
href="http://www.ibm.com/developerworks/cn/linux/l-ipc/part5/index2.html#rate">对本文的评价</A></TD></TR>
<TR class=left-nav-last>
<TD width=14><IMG class=display-img height=1 alt=""
src="Linux环境进程间通信(五) 共享内存(下).files/c.gif" width=14></TD>
<TD width=136><IMG class=display-img height=19 alt=""
src="Linux环境进程间通信(五) 共享内存(下).files/left-nav-corner.gif"
width=136></TD></TR></TBODY></TABLE><BR>
<TABLE cellSpacing=0 cellPadding=0 width=150 border=0>
<TBODY>
<TR>
<TD class=related colSpan=2><B class=related>相关链接:</B></TD></TR>
<TR class=rlinks>
<TD><IMG height=8 alt=""
src="Linux环境进程间通信(五) 共享内存(下).files/rl-bullet.gif" width=2></TD>
<TD><A class=rlinks
href="http://www.ibm.com/developerworks/cn/views/linux/articles.jsp">Linux
技术文档库</A></TD></TR><!--START RESERVED FOR FUTURE USE INCLUDE FILES--><!-- No content currently --><!--END RESERVED FOR FUTURE USE INCLUDE FILES-->
<TR>
<TD width=14><IMG class=display-img height=1 alt=""
src="Linux环境进程间通信(五) 共享内存(下).files/c.gif" width=14></TD>
<TD width=136><IMG class=display-img height=19 alt=""
src="Linux环境进程间通信(五) 共享内存(下).files/c.gif"
width=136></TD></TR></TBODY></TABLE><!--START RESERVED FOR FUTURE USE INCLUDE FILES--><!-- No content currently --><!--END RESERVED FOR FUTURE USE INCLUDE FILES--></TD><!--LEFTNAV_END-->
<TD width="100%">
<TABLE id=content-table cellSpacing=0 cellPadding=0 width="100%"
border=0><TBODY>
<TR vAlign=top>
<TD width="100%">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD><A name=main><IMG height=1 alt=跳转到主要内容
src="Linux环境进程间通信(五) 共享内存(下).files/c.gif" width=592
border=0></A></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR vAlign=top>
<TD width=10 height=18><IMG height=18 alt=""
src="Linux环境进程间通信(五) 共享内存(下).files/c.gif" width=10></TD>
<TD width="100%"><IMG height=6 alt=""
src="Linux环境进程间通信(五) 共享内存(下).files/c.gif" width=1><BR><A
class=bctl
href="http://www.ibm.com/developerworks/cn/">developerWorks
中国</A><SPAN class=bct> > </SPAN><A
class=bctl
href="http://www.ibm.com/developerworks/cn/linux/">Linux</A><SPAN
class=bct> ></SPAN><IMG height=1 alt=""
src="Linux环境进程间通信(五) 共享内存(下).files/c.gif" width=1><BR>
<H1><SPAN style="COLOR: #999999">Linux环境进程间通信(五):
</SPAN>共享内存(下)</H1><IMG class=display-img height=6 alt=""
src="Linux环境进程间通信(五) 共享内存(下).files/c.gif" width=1></TD>
<TD class=no-print width=192><IMG height=18 alt=developerWorks
src="Linux环境进程间通信(五) 共享内存(下).files/dw.gif"
width=192></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR vAlign=top>
<TD width=10><IMG height=1 alt=""
src="Linux环境进程间通信(五) 共享内存(下).files/c.gif" width=10></TD>
<TD width="100%">
<TABLE class=no-print cellSpacing=0 cellPadding=0 width=160
align=right border=0>
<TBODY>
<TR>
<TD width=10><IMG height=1 alt=""
src="Linux环境进程间通信(五) 共享内存(下).files/c.gif" width=10></TD>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width=150 border=0>
<TBODY>
<TR>
<TD class=v14-header-1-small>文档选项</TD></TR></TBODY></TABLE>
<TABLE class=v14-gray-table-border cellSpacing=0 cellPadding=0
border=0>
<TBODY>
<TR>
<TD class=no-padding width=150>
<TABLE cellSpacing=0 cellPadding=0 width=143
border=0><IMG height=1 alt=""
src="Linux环境进程间通信(五) 共享内存(下).files/c.gif" width=8>
<FORM name=email
action=https://www.ibm.com/developerworks/secure/email-it.jsp><INPUT
type=hidden
value="在共享内存(上)中,主要围绕着系统调用mmap()进行讨论的,本部分将讨论系统V共享内存,并通过实验结果对比来阐述两者的异同。系统V共享内存指的是把所有共享数据放在共享内存区域(IPC shared memory region),任何想要访问该数据的进程都必须在本进程的地址空间新增一块内存区域,用来映射存放共享数据的物理内存页面。"
name=body><INPUT type=hidden
value="Linux环境进程间通信(五): 共享内存(下)" name=subject><INPUT
type=hidden value=cn name=lang>
<SCRIPT language=JavaScript type=text/javascript><!--document.write('<tr valign="top"><td width="8"><img src="//www.ibm.com/i/c.gif" width="8" height="1" alt=""/></td><td width="16"><img src="//www.ibm.com/i/v14/icons/em.gif" height="16" width="16" vspace="3" alt="将此页作为电子邮件发送" /></td><td width="122"><p><a class="smallplainlink" href="javascript:document.email.submit();"><b>将此页作为电子邮件发送</b></a></p></td></tr>');//--></SCRIPT>
<NOSCRIPT>
<TBODY>
<TR vAlign=top>
<TD width=8><IMG height=1 alt=""
src="Linux环境进程间通信(五) 共享内存(下).files/c.gif"
width=8></TD>
<TD width=16><IMG height=16 alt=""
src="Linux环境进程间通信(五) 共享内存(下).files/c.gif"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -