What is the memory overhead of a .NET Object

I talk about this in a blog post “Of memory and strings”. It’s implementation-specific, but for the Microsoft .NET CLR v4, the x86 CLR has a per-object overhead of 8 bytes, and the x64 CLR has a per-object overhead of 16 bytes.

However, there are minimum sizes of 12 and 24 bytes respectively – it’s just that you get the first 4 or 8 bytes “free” when you start storing useful information 🙂

(See the blog post for more information.)

Leave a Comment