Open a shared memory region identified by a name string and return an ALTREP-backed R object that reads directly from shared memory.
Arguments
- name
a character string name identifying the shared memory region, as returned by
shared_name().
Value
The R object stored in the shared memory region, or NULL if
name is not a valid shared memory name (wrong type, length, NA,
or missing the mori prefix). If name is well-formed but the
region is absent or corrupted, an error is raised.
See also
share() to create a shared object, shared_name() to
extract the name.
Examples
x <- share(1:100)
nm <- shared_name(x)
y <- map_shared(nm)
sum(y)
#> [1] 5050