replace sys::size_of by mem::size_of