Runtime Memory Model and runtime Memory Model
Runtime Memory Model
In the runtime, the types, objects, threads, and hosting pairs are mutually related. A windows Process of CLR, which may contain multiple current processes.
When a thread is created, a stack of 1 MB is allocated. This stack is mainly used to pass real parameters and local variables defined inside the method.
If an object is involved in the method, create a type object and a type instance in the heap. Type objects are mainly composed of type object pointers, synchronized block indexes, static fields,
Method list. Type instances are mainly composed of type object pointers, synchronized block indexes, and instance fields.
The type object pointer of the type instance points to the type object pointer of the type object. Shows the relationships between them.
This figure shows the memory components of the runtime. It will be helpful for understanding CLR in the future.