The structure of reference type in detail
<p>I know a reference type object is comprised of two parts: a reference to the object, which is essentially a pointer holds the address of the real object, and the object itself that resides on the heap, which might be moved by the GC. The object itself, in turn, consists of two parts: the instance data part (fields) and the metadata part. </p>

<p>I've read numerous pages on the web talking about the storage model of reference type, but none of them gives specific description about how is the metadata part organized. I only learned that it occupied 8 bytes on 32-bit system (which could be observed via profiling), and 4 bytes out of it holds a pointer points to the vtable, but what about the extra 4 bytes? GC marks? built-in attributes? Does anyone know it in detail? I know it's implementation specific, I'm just dying to know how is it actually bit-for-bit organized. For instance, Boehm GC only need a bit as mark, why on earth does CLR need 4 bytes? </p>

<p>--->8----</p>

<p>See the link provided by Damian in the comments! That's the answer I've been looking for.</p>
