For zero_copy accounts, you can use mem::size_of(). But for non-zero_copy accounts, the alignment is off and size_of()
will give you a larger, soincorrect space value. Instead you can do
`
let acc = Account::default();
let size = x.try_to_vec().unwrap().len();`
Basically, you cannot use the mem::size_of for serialized accounts, you need to give the serialized size, which can be inferred from the Default trait of the account