-
-
Notifications
You must be signed in to change notification settings - Fork 9
Alignof
Isaac Shelton edited this page Apr 8, 2022
·
2 revisions
alignof
can be used to get the minimum alignment of type in bytes.
alignof Type
The resulting value will be a usize
that is the minimum alignment of the type in bytes.
import basics
func main {
printf("Alignment of String is %zu bytes\n", alignof String)
}
Alignment of String 8 bytes