📄 sysmman.h.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title><sys/mman.h></title></head><body bgcolor=white><center><font size=2>The Single UNIX ® Specification, Version 2<br>Copyright © 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_000_009_318"> </a>NAME</h4><blockquote>sys/mman.h - memory management declarations</blockquote><h4><a name = "tag_000_009_319"> </a>SYNOPSIS</h4><blockquote><pre><code>#include <sys/mman.h></code></pre></blockquote><h4><a name = "tag_000_009_320"> </a>DESCRIPTION</h4><blockquote>The following protection options are defined:<dl compact><dt>PROT_READ<dd>Page can be read.<dt>PROT_WRITE<dd>Page can be written.<dt>PROT_EXEC<dd>Page can be executed.<dt>PROT_NONE<dd>Page can not be accessed.</dl><p>The following <i>flag</i> options are defined:<dl compact><dt>MAP_SHARED<dd>Share changes.<dt>MAP_PRIVATE<dd>Changes are private.<dt>MAP_FIXED<dd>Interpret addr exactly.</dl><p>The following flags are defined for<i><a href="msync.html">msync()</a></i>:<dl compact><dt>MS_ASYNC<dd>Perform asynchronous writes.<dt>MS_SYNC<dd>Perform synchronous writes.<dt>MS_INVALIDATE<dd>Invalidate mappings.</dl><p>The following symbolic constants are defined for the<i><a href="mlockall.html">mlockall()</a></i>function:<dl compact><dt>MCL_CURRENT<dd>Lock currently mapped pages.<dt>MCL_FUTURE<dd>Lock pages that become mapped.</dl><p>The symbolic constant MAP_FAILED is defined to indicate a failure from the<i><a href="mmap.html">mmap()</a></i>function.<p>The<b>size_t</b>and<b>off_t</b>types are defined as described in<i><a href="systypes.h.html"><sys/types.h></a></i>.<p>The following are declared in <<b>sys/mman.h</b>> as functions and may also bedefined as macros.Function prototypes must be provided for use with an ISO Ccompiler.<pre><code>int <a href="mlock.html">mlock</a>(const void *, size_t);int <a href="mlockall.html">mlockall</a>(int);void *<a href="mmap.html">mmap</a>(void *, size_t, int, int, int, off_t);int <a href="mprotect.html">mprotect</a>(void *, size_t, int);int <a href="msync.html">msync</a>(void *, size_t, int);int <a href="munlock.html">munlock</a>(const void *, size_t);int <a href="munlockall.html">munlockall</a>(void);int <a href="munmap.html">munmap</a>(void *, size_t);int <a href="shm_open.html">shm_open</a>(const char *, int, mode_t);int <a href="shm_unlink.html">shm_unlink</a>(const char *);</code></pre></blockquote><h4><a name = "tag_000_009_321"> </a>APPLICATION USAGE</h4><blockquote>The functions<i><a href="mlock.html">mlock()</a></i>,<i><a href="mlockall.html">mlockall()</a></i>,<i><a href="shm_open.html">shm_open()</a></i>,and<i><a href="shm_unlink.html">shm_unlink()</a></i>are part of the <a href="feature.html">Realtime Feature Group</a>.</blockquote><h4><a name = "tag_000_009_322"> </a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_009_323"> </a>SEE ALSO</h4><blockquote><i><a href="mlock.html">mlock()</a></i>,<i><a href="mlockall.html">mlockall()</a></i>,<i><a href="mmap.html">mmap()</a></i>,<i><a href="mprotect.html">mprotect()</a></i>,<i><a href="msync.html">msync()</a></i>,<i><a href="munmap.html">munmap()</a></i>,<i><a href="shm_open.html">shm_open()</a></i>,<i><a href="shm_unlink.html">shm_unlink()</a></i>.</blockquote><hr size=2 noshade><center><font size=2>UNIX ® is a registered Trademark of The Open Group.<br>Copyright © 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -