Object header get complicated

Object header, sync block, thin lock vs fat lock, hashcode – all of this and more will be explained in the following post.

First, let’s make a brief overview on the object header in the CLR.

What is the object header?
object_hader_1

An header is – like it sound – header “above” the object.
If I try to illustrate it, it will be like this —->

Every object in CLR has an header that contains
info related to the object. The run -time use this info as we’ll see later in this post.

 

Continue reading

Posted in .NET, c# | Tagged , , , , , , , , , , , , | 4 Comments