Skip to content

Instantly share code, notes, and snippets.

@timbaev
Created February 27, 2021 07:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timbaev/333507e1d87f991dc3fd85ae460c4c6f to your computer and use it in GitHub Desktop.
Save timbaev/333507e1d87f991dc3fd85ae460c4c6f to your computer and use it in GitHub Desktop.
[FullResume] size check #memorySwift
struct FullResume {
let hasVehicle: Bool
let id: String
let age: Int
}
MemoryLayout<FullResume>.size // 32 ???
MemoryLayout<Bool>.size // 1
+ MemoryLayout<String>.size // 16
+ MemoryLayout<Int>.size // 8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment