-
Notifications
You must be signed in to change notification settings - Fork 27
Closed
Description
If I understand https://doc.rust-lang.org/nomicon/other-reprs.html#reprpacked correctly,
#[repr(packed)] forces byte alignment. And it sounds like this may be problematic:
most architectures strongly prefer values to be aligned.
I very new to Rust (and system level programming), but this sounds scary to me.
Could you explain, why the Buf32 should be packed?
#[repr(packed)]
pub struct Buf32<H> {
pub ptr: *mut H,
pub len: u32,
pub cap: u32,
}
Metadata
Metadata
Assignees
Labels
No labels