mmapFlags: Create Bitwise Flags for mmap.

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/mmap.R

Description

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

Usage

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.

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.

Value

An integer vector of length 1.

Note

Read your system's ‘mmap’ man pages for use details.

Author(s)

Jeffrey A. Ryan

See Also

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

Examples

1
2
3
4
5
mmapFlags(PROT_READ)
mmapFlags(PROT_READ | PROT_WRITE)
mmapFlags("PROT_READ" | "PROT_WRITE")
mmapFlags(PROT_READ , PROT_WRITE)
mmapFlags("PROT_READ" , "PROT_WRITE")

Example output

[1] 1
[1] 3
[1] 3
[1] 3
[1] 3

mmap documentation built on May 2, 2019, 4:45 p.m.