Skip to main content

IPC_SECTION_ALIGNMENT

Constant IPC_SECTION_ALIGNMENT 

Source
pub const IPC_SECTION_ALIGNMENT: usize = 64;
Expand description

Byte alignment that each IPC section’s stream start is padded to.

When several IPC streams are concatenated into one larger blob (e.g. a cache entry), a section that starts at an arbitrary offset would leave its array data misaligned. FileDecoder with require_alignment = false then silently copies each buffer into a freshly aligned allocation on every read, defeating zero-copy. Padding each section start to a 64-byte boundary keeps the decoded buffers borrowed directly from the input.