Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

alignment

The rule that a value must start at an address divisible by some number.

A type's alignment is the power of two its address must be a multiple of; the compiler adds padding to satisfy it.

Loading interactive…

Examples

  • std::mem::align_of::<u64>() is 8, so every u64 starts at an address that is a multiple of 8.

Read the full section →