Current File : //usr/man/man3head/mman.h.3head
'\" te
.\" Copyright (c) 2001, The IEEE and The Open Group. All Rights Reserved.
.\" Portions Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
.\"  Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at  http://www.opengroup.org/bookstore/.
.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.  This notice shall appear on any product containing this material. 
.TH mman.h 3HEAD "5 Feb 2008" "SunOS 5.11" "Headers"
.SH NAME
mman.h, mman \- memory management declarations
.SH SYNOPSIS
.LP
.nf
#include <\fBsys/mman.h\fR>
.fi

.SH DESCRIPTION
.sp
.LP
The <\fBsys/mman.h\fR> header supports the following options:
.RS +4
.TP
.ie t \(bu
.el o
the Memory Mapped Files option
.RE
.RS +4
.TP
.ie t \(bu
.el o
the Shared Memory Objects option
.RE
.RS +4
.TP
.ie t \(bu
.el o
the Process Memory Locking option
.RE
.RS +4
.TP
.ie t \(bu
.el o
the Memory Protection option
.RE
.RS +4
.TP
.ie t \(bu
.el o
the Synchronized Input and Output option
.RE
.sp
.LP
For Memory Mapped Files and Shared Memory Objects options, the following protection options are defined:
.sp
.ne 2
.mk
.na
\fB\fBPROT_READ\fR\fR
.ad
.RS 14n
.rt  
Page can be read.
.RE

.sp
.ne 2
.mk
.na
\fB\fBPROT_WRITE\fR\fR
.ad
.RS 14n
.rt  
Page can be written.
.RE

.sp
.ne 2
.mk
.na
\fB\fBPROT_EXEC\fR\fR
.ad
.RS 14n
.rt  
Page can be executed.
.RE

.sp
.ne 2
.mk
.na
\fB\fBPROT_NONE\fR\fR
.ad
.RS 14n
.rt  
Page cannot be accessed.
.RE

.sp
.LP
The following \fIflag\fR options are defined:
.sp
.ne 2
.mk
.na
\fB\fBMAP_SHARED\fR\fR
.ad
.RS 15n
.rt  
Share changes.
.RE

.sp
.ne 2
.mk
.na
\fB\fBMAP_PRIVATE\fR\fR
.ad
.RS 15n
.rt  
Changes are private.
.RE

.sp
.ne 2
.mk
.na
\fB\fBMAP_FIXED\fR\fR
.ad
.RS 15n
.rt  
Interpret \fBaddr\fR exactly.
.RE

.sp
.LP
The flags immediately following are defined for \fBmsync()\fR. See \fBmsync\fR(3C).
.sp
.ne 2
.mk
.na
\fB\fBMS_ASYNC\fR\fR
.ad
.RS 17n
.rt  
Perform asynchronous writes.
.RE

.sp
.ne 2
.mk
.na
\fB\fBMS_SYNC\fR\fR
.ad
.RS 17n
.rt  
Perform synchronous writes.
.RE

.sp
.ne 2
.mk
.na
\fB\fBMS_INVALIDATE\fR\fR
.ad
.RS 17n
.rt  
Invalidate mappings.
.RE

.sp
.LP
The symbolic constants immediately following are defined for the \fBmlockall()\fR function. See \fBmlockall\fR(3C).
.sp
.ne 2
.mk
.na
\fB\fBMCL_CURRENT\fR\fR
.ad
.RS 15n
.rt  
Lock currently mapped pages.
.RE

.sp
.ne 2
.mk
.na
\fB\fBMCL_FUTURE\fR\fR
.ad
.RS 15n
.rt  
Lock pages that become mapped.
.RE

.sp
.LP
The symbolic constant \fBMAP_FAILED\fR is defined to indicate a failure from the \fBmmap()\fR function. See \fBmmap\fR(2).
.sp
.LP
The \fBmode_t\fR, \fBoff_t\fR, and \fBsize_t\fR types are be defined as described in <\fBsys/types.h\fR>. See \fBtypes\fR(3HEAD).
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
tab() box;
cw(2.75i) |cw(2.75i) 
lw(2.75i) |lw(2.75i) 
.
ATTRIBUTE TYPEATTRIBUTE VALUE
_
Interface StabilityCommitted
_
StandardSee \fBstandards\fR(5).
.TE

.SH SEE ALSO
.sp
.LP
\fBmmap\fR(2), \fBmprotect\fR(2), \fBmunmap\fR(2), \fBmadvise\fR(3C), \fBmlock\fR(3C), \fBmlockall\fR(3C), \fBmsync\fR(3C), \fBshm_open\fR(3C), \fBshm_unlink\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5)