criu

Shared Memory

CRIU provides comprehensive support for capturing and reconstructing the various ways processes share memory in Linux. This includes anonymous shared regions, file-backed shared mappings, and System V IPC segments.

Types of Shared Memory

CRIU categorizes shared memory into three primary types, each with a dedicated restoration strategy:

1. Shared Anonymous Mappings

Created via mmap(..., MAP_SHARED | MAP_ANONYMOUS, ...), these regions have no persistent backing file on disk but are shared between a parent and its children after a fork(), or between unrelated processes that inherit the mapping.

2. Shared File Mappings

Created via mmap(..., MAP_SHARED, fd, ...), these regions are backed by a regular file on the filesystem.

3. System V IPC Shared Memory

Managed via the legacy shmget() and shmat() APIs, these segments are part of the kernel’s IPC subsystem.

Advanced Coordination Features

CRIU leverages modern kernel features to handle complex sharing accurately:

See also