Interview Question
Qus: What are the divisions of the Memory Heap?
By default, when the .NET application is started and virtual address space is allocated for the process the following data structures, represented as heaps, are created:
Code Heap – storing JIT-compiled native code
Small Object Heap (SOH) – storing objects of size less than 85 kilobytes
Large Object Heap (LOH) – storing objects of size greater than 85 kilobytes
Process Heap.
Answers (2)
Generation 0 – Used to store short-lived objects. Frequent Garbage Collection happens in this Generation.
Generation 1 – Used for medium-lived objects.
Generation 2 – Used for long-lived objects.
Code Heap – storing JIT-compiled native code
Small Object Heap (SOH) – storing objects of size less than 85 kilobytes
Large Object Heap (LOH) – storing objects of size greater than 85 kilobytes
Process Heap.