Learn R Programming

mmap (version 0.6-19)

mmapFlags: Create Bitwise Flags for mmap.

Description

Allows for unquoted C constant names to be bitwise OR'd together for passing to mmap related calls.

Usage

mmapFlags(...)

Value

An integer vector of length 1.

Arguments

...

A comma or vertical bar ‘|’ seperated list of zero or more valid mmap constants. May be quoted or unquoted from the following: PROT_READ, PROT_WRITE, PROT_EXEC, PROT_NONE, MAP_SHARED, MAP_PRIVATE, MAP_FIXED, MS_ASYNC, MS_SYNC, MS_INVALIDATE. See details for more information.

Author

Jeffrey A. Ryan

Details

Argument list may contain quoted or unquoted constants as defined in <sys/mman.h>. See invididual functions for details on valid flags.

Multiple values passed in will be bitwise OR'd together at the C level, allowing for semantics close to that of native C calls.

See Also

See Also as mmap, ~~~ See Also as mprotect, ~~~

Examples

Run this code
mmapFlags(PROT_READ)
mmapFlags(PROT_READ | PROT_WRITE)
mmapFlags("PROT_READ" | "PROT_WRITE")
mmapFlags(PROT_READ , PROT_WRITE)
mmapFlags("PROT_READ" , "PROT_WRITE")

Run the code above in your browser using DataLab