segment_create: Create a new shared memory segment
Description
Create a new shared memory segment
Usage
segment_create(
size,
backing = c("auto", "mmap", "shm"),
path = NULL,
readonly = FALSE
)Value
A shard_segment object backed by shared memory.
Arguments
- size
Size of the segment in bytes
- backing
Backing type: "auto", "mmap", or "shm"
- path
Optional file path for mmap backing (NULL for temp file)
- readonly
Create as read-only (after initial write)
Examples
Run this code# \donttest{
seg <- segment_create(1024 * 1024)
segment_info(seg)
segment_close(seg)
# }
Run the code above in your browser using DataLab