O'Reilly logo
  • James Goldman thinks this is interesting:

Heap block headers are just an implementation detail, and other CLI implementations could choose different strategies. However, it’s useful to know what the overhead is. On a 32-bit system, the header is 8 bytes long, and if you’re running in a 64-bit process, it takes 16 bytes. So an object that contained just one field of type double (an 8-byte type) would consume 16 bytes in a 32-bit process, and 24 bytes in a 64-bit process.


Cover of Programming C# 5.0


A good reason to use value types when possible.