A day with .Net

My day to day experince in .net

C# Different Types Of Heap Memory

Posted by vivekcek on July 10, 2016

You might be heard that, reference objects are stored in heap:).
Do you know how many types of heaps are available in CLR.
Do you know that, you can pass data to another app domain with out marshaling:)

These all are .NET CLR implementation details, know to Bill Gates:)

You can explore, if you want to know more, Later i will post about memory management in CLR.

For the time being have a look at the types of heap’s below.

Loader Heap: contains CLR structures and the type system
High Frequency Heap: statics, MethodTables, FieldDescs, interface map
Low Frequency Heap: EEClass, ClassLoader and lookup tables
Stub Heap: stubs for CAS, COM wrappers, PInvoke
Large Object Heap: memory allocations that require more than 85k bytes
GC Heap: user allocated heap memory private to the app
JIT Code Heap: memory allocated by mscoreee (Execution Engine) and the JIT compiler for managed code
Process/Base Heap: interop/unmanaged allocations, native memory, etc

Usually, the “heaps” that most people refer to or know about are the “GC Heap” and the LOH.
GC Heap is shared among app-domains and GC will work only on that.

Capture

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s