Hey ๐
When I run the following code on my mac I get: "size of InnerNode: 96", while the actual size of that struct should be 88
use std::mem::size_of;
pub struct InnerNode {
pub tag: u8,
pub padding: [u8; 3],
pub prefix_len: u32,
pub key: u128,
pub children: [u32; 2],
pub child_earliest_expiry: [u64; 2],
pub reserved: [u8; 40],
}
fn main() {
println!("size of InnerNode: {}", size_of::<InnerNode>());
}
If I run the same program on the rust playground I get the correct size - https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=df6a72a6f427b5cbd60b79ac935424b7
What gives? Is this an expected behaviour?
A browser interface to the Rust compiler to experiment with the language
