Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the difference between object and loader heap in .net 4.0

Tags:

c#-4.0

basically i like to know how static classes are handled by clr?

like image 674
slash shogdhe Avatar asked Oct 21 '25 04:10

slash shogdhe


1 Answers

heap memory is divided into to parts,object heap and loader heap(also known as high frequency heap).All non static reference type are stored on object heap and all static object(either reference type or value type) are stored in loader heap. Gc never work on loader heap thats why they initilized only once and remain in memory throught the application.

like image 64
slash shogdhe Avatar answered Oct 23 '25 07:10

slash shogdhe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!