Please enable JavaScript.
Coggle requires JavaScript to display documents.
Garbage Collection - Coggle Diagram
Garbage Collection
-
-
Object Generation
GC checks each time every object being used or not in an optimized way that is called generations. There are total 3 generation of objects. 0th, 1st, 2nd
first all objects are stored in 0th generation. which is got checked very frequently for cleaning by GC, if there is a reference exist any objects then it is survived and object promoted into generation 1 then same operation generation 2 and then generation 3.
G0 get checked more frequently, G1 get Fewer checks, G2 get less checks
Large Area Heap
If a object has with size of more than 85000Bits it lives in LAH which provides a special treatment. Directly it is assigned to G2. Also it has a special feature which are pinned i.e during defragmentation LAH objects are living in same memory location. Without moving to other empty address to free up the memory
Memory Leak
Memory leak is situation when some piece of memory is not being cleaned up. Even if the object occupying it no longer in use
-
Memory Defragmentation
The Process of moving object in memory to create more memory blocks of free memory called memory defragmentation.it simpler word it organize the memory after clean up of unused objects
-
The Heap Memory Management mechanism call Garbage Collector. This is Part of CLR. Once object no longer used we need to remove it from memory
-