.\" .\" 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 SunOS 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. .\" .\" The contents of this file are subject to the terms of the .\" Common Development and Distribution License (the "License"). .\" You may not use this file except in compliance with the License. .\" .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE .\" or http://www.opensolaris.org/os/licensing. .\" See the License for the specific language governing permissions .\" and limitations under the License. .\" .\" When distributing Covered Code, include this CDDL HEADER in each .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. .\" If applicable, add the following below this CDDL HEADER, with the .\" fields enclosed by brackets "[]" replaced with your own identifying .\" information: Portions Copyright [yyyy] [name of copyright owner] .\" .\" .\" Copyright (c) 2001, The IEEE and The Open Group. All Rights Reserved. .\" Portions Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved. .\" .TH MMAN.H 3HEAD "Feb 5, 2008" .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 .na \fB\fBPROT_READ\fR\fR .ad .RS 14n Page can be read. .RE .sp .ne 2 .na \fB\fBPROT_WRITE\fR\fR .ad .RS 14n Page can be written. .RE .sp .ne 2 .na \fB\fBPROT_EXEC\fR\fR .ad .RS 14n Page can be executed. .RE .sp .ne 2 .na \fB\fBPROT_NONE\fR\fR .ad .RS 14n Page cannot be accessed. .RE .sp .LP The following \fIflag\fR options are defined: .sp .ne 2 .na \fB\fBMAP_SHARED\fR\fR .ad .RS 15n Share changes. .RE .sp .ne 2 .na \fB\fBMAP_PRIVATE\fR\fR .ad .RS 15n Changes are private. .RE .sp .ne 2 .na \fB\fBMAP_FIXED\fR\fR .ad .RS 15n Interpret \fBaddr\fR exactly. .RE .sp .LP The flags immediately following are defined for \fBmsync()\fR. See \fBmsync\fR(3C). .sp .ne 2 .na \fB\fBMS_ASYNC\fR\fR .ad .RS 17n Perform asynchronous writes. .RE .sp .ne 2 .na \fB\fBMS_SYNC\fR\fR .ad .RS 17n Perform synchronous writes. .RE .sp .ne 2 .na \fB\fBMS_INVALIDATE\fR\fR .ad .RS 17n Invalidate mappings. .RE .sp .LP The symbolic constants immediately following are defined for the \fBmlockall()\fR function. See \fBmlockall\fR(3C). .sp .ne 2 .na \fB\fBMCL_CURRENT\fR\fR .ad .RS 15n Lock currently mapped pages. .RE .sp .ne 2 .na \fB\fBMCL_FUTURE\fR\fR .ad .RS 15n 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(7) for descriptions of the following attributes: .sp .sp .TS box; c | c l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Interface Stability Committed _ Standard See \fBstandards\fR(7). .TE .SH SEE ALSO .sp .LP .BR mmap (2), .BR mprotect (2), .BR munmap (2), .BR madvise (3C), .BR mlock (3C), .BR mlockall (3C), .BR msync (3C), .BR shm_open (3C), .BR shm_unlink (3C), .BR attributes (7), .BR standards (7)