Skip to main content

Module shared_memory

Module shared_memory 

Source
Expand description

Memory shared with a child process this one starts.

The parent creates and maps the memory; the child inherits its descriptor at spawn (SharedMemory::hand_to) and maps the same pages, so bulk data crosses with one copy in and one out and no pipe in between.

On Linux and Android it is a memfd sealed against resizing; on macOS a POSIX shared memory object unlinked at once.

Structsยง

SharedMemory