Skip to content

Commit

Permalink
Define the alignment of char in type-layout chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
chorman0773 committed Nov 22, 2024
1 parent 91326de commit 1d3a35a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/type-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ In particular, `i128` and `u128` are often aligned to 4 or 8 bytes even though
their size is 16, and on many 32-bit platforms, `i64`, `u64`, and `f64` are only
aligned to 4 bytes, not 8.

r[layout.primitive.align-char]
The alignment of `char` is the same as the alignment of `u32`.

## Pointers and References Layout

r[layout.pointer]
Expand Down

0 comments on commit 1d3a35a

Please sign in to comment.