% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/share.R
\name{shared_name}
\alias{shared_name}
\title{Extract Shared Memory Name}
\usage{
shared_name(x)
}
\arguments{
\item{x}{a shared object as returned by \code{\link[=share]{share()}} or \code{\link[=map_shared]{map_shared()}}.}
}
\value{
A character string identifying the shared object, or \code{NULL} if
\code{x} is not a shared object. For a sub-list or element extracted from a
shared list, the string carries a bracketed 1-based index path (e.g.
\code{"/mori_abc_1[2,3]"}). \code{\link[=map_shared]{map_shared()}} accepts both forms; the
path-qualified form returns the addressed sub-object directly. The
underlying shared memory region name is the prefix before \code{[} and is
recoverable via \verb{sub("\\\[.*$", "", shared_name(x))}.
}
\description{
Extract the shared memory name from a shared object. This name can be
passed to \code{\link[=map_shared]{map_shared()}} to open the same region in another process.
}
\examples{
x <- share(rnorm(100))
shared_name(x)

}
\seealso{
\code{\link[=map_shared]{map_shared()}} to open a shared region by name.
}
