Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mman(3head) [sunos man page]

mman.h(3HEAD)							      Headers							     mman.h(3HEAD)

NAME
mman.h, mman - memory management declarations SYNOPSIS
#include <sys/mman.h> DESCRIPTION
The <sys/mman.h> header supports the following options: o the Memory Mapped Files option o the Shared Memory Objects option o the Process Memory Locking option o the Memory Protection option o the Synchronized Input and Output option For Memory Mapped Files and Shared Memory Objects options, the following protection options are defined: PROT_READ Page can be read. PROT_WRITE Page can be written. PROT_EXEC Page can be executed. PROT_NONE Page cannot be accessed. The following flag options are defined: MAP_SHARED Share changes. MAP_PRIVATE Changes are private. MAP_FIXED Interpret addr exactly. The flags immediately following are defined for msync(). See msync(3C). MS_ASYNC Perform asynchronous writes. MS_SYNC Perform synchronous writes. MS_INVALIDATE Invalidate mappings. The symbolic constants immediately following are defined for the mlockall() function. See mlockall(3C). MCL_CURRENT Lock currently mapped pages. MCL_FUTURE Lock pages that become mapped. The symbolic constant MAP_FAILED is defined to indicate a failure from the mmap() function. See mmap(2). The mode_t, off_t, and size_t types are be defined as described in <sys/types.h>. See types(3HEAD). ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
mmap(2), mprotect(2), munmap(2), madvise(3C), mlock(3C), mlockall(3C), msync(3C), shm_open(3RT), shm_unlink(3RT), attributes(5), stan- dards(5) SunOS 5.10 10 Sep 2004 mman.h(3HEAD)

Check Out this Related Man Page

mctl(3UCB)					     SunOS/BSD Compatibility Library Functions						mctl(3UCB)

NAME
mctl - memory management control SYNOPSIS
/usr/ucb/cc[ flag ... ] file ... #include <sys/types.h> #include <sys/mman.h> int mctl( addr, len, function, arg); caddr_t addr; size_t len; int function; int arg; DESCRIPTION
mctl() applies a variety of control functions over pages identified by the mappings established for the address range [addr, addr + len). The function to be performed is identified by the argument function. Valid functions are defined in mman.h as follows: MC_LOCK Lock the pages in the range in memory. This function is used to support mlock(). See mlock(3C) for semantics and usage. arg is ignored. MC_LOCKAS Lock the pages in the address space in memory. This function is used to support mlockall(). See mlockall(3C) for seman- tics and usage. addr and len are ignored. arg is an integer built from the flags: MCL_CURRENT Lock current mappings MCL_FUTURE Lock future mappings MC_SYNC Synchronize the pages in the range with their backing storage. Optionally invalidate cache copies. This function is used to support msync(). See msync(3C) for semantics and usage. arg is used to represent the flags argument to msync(). It is con- structed from an OR of the following values: MS_SYNC Synchronized write MS_ASYNC Return immediately MS_INVALIDATE Invalidate mappings MS_ASYNC returns after all I/O operations are scheduled. MS_SYNC does not return until all I/O operations are complete. Specify exactly one of MS_ASYNC or MS_SYNC. MS_INVALIDATE invalidates all cached copies of data from memory, requiring them to be re-obtained from the object's permanent storage location upon the next reference. MC_UNLOCK Unlock the pages in the range. This function is used to support munlock(). arg is ignored. MC_UNLOCKAS Remove address space memory lock, and locks on all current mappings. This function is used to support munlockall(). addr and len must have the value 0. arg is ignored. RETURN VALUES
mctl() returns 0 on success, -1 on failure. ERRORS
mctl() fails if: EAGAIN Some or all of the memory identified by the operation could not be locked due to insufficient system resources. EBUSY MS_INVALIDATE was specified and one or more of the pages is locked in memory. EINVAL addr is not a multiple of the page size as returned by getpagesize(). EINVAL addr and/or len do not have the value 0 when MC_LOCKAS or MC_UNLOCKAS are specified. EINVAL arg is not valid for the function specified. EIO An I/O error occurred while reading from or writing to the file system. ENOMEM Addresses in the range [addr, addr + len) are invalid for the address space of a process, or specify one or more pages which are not mapped. EPERM The process's effective user ID is not super-user and one of MC_LOCK MC_LOCKAS, MC_UNLOCK, or MC_UNLOCKAS was specified. SEE ALSO
mmap(2), memcntl(2), getpagesize(3C), mlock(3C), mlockall(3C), msync(3C) NOTES
Use of these interfaces should be restricted to only applications written on BSD platforms. Use of these interfaces with any of the system libraries or in multi-thread applications is unsupported. SunOS 5.10 18 Feb 1993 mctl(3UCB)
Man Page