No more nonsense, I am engaged in the web direction, C/S is not very familiar with, first look at the interface map (relatively rough), here is only a visual effect to initially show the GC corresponding operation (simple effect shows that is not true GC insider, that I do not understand)
Basic concepts
object's build process (newobj Directive)
1: Calculate the total number of bytes in all fields for type (including base class)
2: The total number of bytes plus the Object Cost field bytes (added as: The number of bytes required by the object). Each object contains 2 cost fields: The type object pointer and the synchronization block index. WIN32, each accounted for 32, WIN64, each accounted for 64 digits.
3:CLR detects if there is enough space in the managed heap to meet the number of bytes required by the object. If satisfied, the object is assigned to the location indicated by the Nextobjptr pointer, the instance constructor is invoked, and the new operation returns the memory address of the object. The pointer nextobjptr over the area where the object is located, indicating the address of the next new object in the managed heap. If not satisfied, do garbage collection.
Root
Each application has a set of root roots. A root is a storage address that contains a pointer to a type object.
The pointer has 2 forms: (1) pointing to an object in the managed heap. (2) set to NULL.
The root includes static fields, method parameters, local variables, and CPU registers.
Generation of objects
In the managed heap, the object's generation is about 0 generations, 1 generations, and 2 generations, and the corresponding memory capacity is 256k,2m,10m. Of course, the garbage collector automatically adjusts the budget capacity.