Robots Atlas>ROBOTS ATLAS
Infrastructure

Zero-copy

ActivePublished: 22 September 2026Updated: 22 September 2026Published
Key innovation
Eliminates redundant copying of data between memory buffers (kernel↔user space, process↔process, CPU↔GPU) by passing data via pointers, memory mapping, or hardware DMA instead of physically copying it with the CPU.
Category
Infrastructure
Abstraction level
Pattern
Operation level
ServingDeploymentRobot control
Use cases
File and web servers (sendfile)High-throughput network transportMultimedia and video stream processingROS 2 intra-process communicationShared-memory DDS middleware (iceoryx, Fast DDS)GPU data transport between nodes (Isaac ROS)AI inference pipelines (tensor transfer)RDMA in HPC/AI clusters

How it works

Zero-copy is achieved through several complementary mechanisms: (1) mmap() maps a file or memory region directly into the process address space, so no separate copy is needed; (2) sendfile()/splice() move data between file descriptors entirely inside the kernel, bypassing the user-space buffer; (3) shared memory lets multiple processes read the same region without copying — only a pointer or handle is exchanged; (4) DMA (Direct Memory Access) lets a hardware controller move data between a device and memory without the CPU; (5) unified CPU–GPU memory and pointer passing eliminate host↔device copies. In every variant, instead of physically copying bytes a reference to the data is passed (pointer, offset, handle), and correctness is ensured by buffer ownership management and access synchronization.

Problem solved

Traditional data transfer copies the same bytes multiple times between buffers (kernel↔user space, process↔process, CPU↔GPU), burning CPU cycles and memory bandwidth and forcing context switches. For large data volumes (camera frames, network streams, tensors) these redundant copies become a performance bottleneck and a source of latency.

Components

Memory mapping (mmap)Shared access to data without a copy

Maps a file or memory region directly into the process address space, eliminating a copy into a separate user buffer.

Official

In-kernel transfer (sendfile / splice)File↔socket transfer without a user-space copy

System calls that move data between descriptors (e.g. file→socket) entirely inside the kernel, bypassing the user-space buffer.

Official

Shared memoryZero-copy IPC between processes

A memory region accessible to multiple processes; instead of copying, a pointer/handle is exchanged. The basis of zero-copy in IPC middleware (e.g. iceoryx).

Official

Direct Memory Access (DMA)Hardware transfer bypassing the CPU

Hardware-driven data transfer between a device (NIC, disk, GPU) and memory without CPU involvement; includes variants such as RDMA and GPUDirect.

Official

Unified memory / pointer passing (CPU–GPU)Zero-copy between host and accelerator

A shared CPU–GPU address space allowing data to be passed by pointer instead of a host↔device copy; key for GPU pipelines (e.g. Isaac ROS).

Official

Implementation

Implementation pitfalls
Buffer lifetime managementCritical

Releasing or overwriting a shared buffer before the consumer finishes reading leads to use-after-free bugs and data corruption.

Fix:Clear ownership semantics (e.g. loan/return in ROS 2), reference counting, and explicit buffer lifecycle control.
Reader–writer races in shared memoryHigh

Lack of synchronization on a shared region can yield inconsistent or partially written data.

Fix:Synchronization mechanisms (mutexes, memory barriers), buffer versioning, or double-buffering.
Alignment and page-size requirementsMedium

mmap and DMA require page-boundary alignment; failing this breaks the mapping or forces a copy.

Fix:Allocate page-aligned buffers and respect hardware DMA constraints.
Shared-memory securityMedium

Data in shared memory is visible to other processes with access to it, increasing the attack surface.

Fix:Access control on memory segments, isolation, and minimizing data exposure time.
Silent fallback to copyingMedium

When the transport layer does not support zero-copy, the system may silently fall back to copying, negating the expected performance gains.

Fix:Verify loaning capability (e.g. can_loan_messages() in ROS 2) and monitor the actual transport path.

Evolution

1999
sendfile() introduced in the Linux kernel
Inflection point

The sendfile() call first appeared in Linux 2.2, enabling file→socket transfer without copying data into user space.

2006
splice() added (Linux 2.6.17)

splice() generalized zero-copy to arbitrary descriptor pairs, moving data through an in-kernel pipe.

2017
MSG_ZEROCOPY for TCP (Linux 4.14)

Added zero-copy for sending network data directly from user-space buffers.

2019
Loaned messages in ROS 2
Inflection point

ROS 2 (Eloquent) introduced the loaned-messages API, enabling zero-copy via shared memory in DDS (e.g. Eclipse iceoryx, RTI Connext DDS Micro).

2022
NVIDIA Isaac ROS NITROS

Type adaptation (REP-2007) and type negotiation (REP-2009) enabled zero-copy transport of GPU data between ROS 2 nodes.

2026
NITROS deprecated in favor of rosidl::Buffer + CUDA buffer backend

Isaac ROS moved GPU zero-copy to native ROS 2 messages with rosidl::Buffer fields and a CUDA buffer backend.

Hyperparameters (configurable axes)

Buffer ownership & lifetimeCritical

Who owns the shared buffer and when it can be safely released (loan/return model).

Synchronization modelHigh

How reader–writer races in shared memory are prevented (mutex, barriers, versioning).

Memory alignment / page sizeMedium

Required page-boundary alignment for mmap and DMA.

Copy fallback pathMedium

Behavior when the transport layer does not support zero-copy (e.g. ROS_DISABLE_LOANED_MESSAGES → fallback to a copy).

Computational complexity

Time complexity: O(1) kopii CPU (vs. O(n)). Space complexity: O(1) dodatkowej pamięci buforowej.

Hardware requirements

Primary

Zero-copy is a systems/software technique that works on any platform with an MMU and operating-system support.

Good fit

Unified CPU–GPU memory and GPUDirect allow moving tensors between host and GPU without a copy, accelerating inference and vision pipelines.