% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/segment.R
\name{segment_create}
\alias{segment_create}
\title{Create a new shared memory segment}
\usage{
segment_create(
  size,
  backing = c("auto", "mmap", "shm"),
  path = NULL,
  readonly = FALSE
)
}
\arguments{
\item{size}{Size of the segment in bytes}

\item{backing}{Backing type: "auto", "mmap", or "shm"}

\item{path}{Optional file path for mmap backing (NULL for temp file)}

\item{readonly}{Create as read-only (after initial write)}
}
\value{
A \code{shard_segment} object backed by shared memory.
}
\description{
Create a new shared memory segment
}
\examples{
\donttest{
seg <- segment_create(1024 * 1024)
segment_info(seg)
segment_close(seg)
}
}
