A data-packing device, such as a direct memory access controller (DMA),
aligns data at a granularity smaller than an error protected unit (EPU)
encoded by an error correction code (ECC) in the memory. For example, the
data alignment is at a double-word level or a byte level. The
data-packing device reads data from the memory, shifting the data, and
marks a good data unit as corrupted if the data unit constitutes a
fractional portion of a corrupted EPU. The marking of the data unit is
performed by inverting a parity bit of the data unit.