Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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(...)

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

mmapFlags(PROT_READ)
mmapFlags(PROT_READ | PROT_WRITE)
mmapFlags("PROT_READ" | "PROT_WRITE")
mmapFlags(PROT_READ , PROT_WRITE)
mmapFlags("PROT_READ" , "PROT_WRITE")

mmap

Map Pages of Memory

v0.6-19
GPL-3
Authors
Jeffrey A. Ryan
Initial release
2020-01-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.