0

I am checking memory usage of my program using CLR profiler and i am concerned with the LOH allocation . Basically, i am allocating 10 files each of 1 mb size to an Azure data lake service file parallely ( using concurrentAppend API). Theoretically , LOH size should be 10 mb , right ? In the report preview( picture 1 ) -> i see that LOH heap bytes is 3.195 MB. When i check object by address( picture 2) -> LOH alloactes exactly 10 MB ( i checked by runnig the cursor over LOH bar and found 10 addresses each with 1 mb system.byte[] data.

so why am i getting 3.199 MB in preview report??

CLR profiler report preview

Object by address window

kchahat20
  • 97
  • 1
  • 11
  • _Theoretically , LOH size should be 10 mb , right ?_: no, a lot of thing can be stored in LOH as everything above 85KB goes there. Have you inspected objects that are stored in LOH, besides the ones created by your code. – cassandrad Jun 19 '20 at 13:32
  • yep it can be more than 10 mb , but i was confused as of why it is showing 3.1 mb in CLR report preview (img 1 ) – kchahat20 Jun 19 '20 at 22:55
  • Maybe I misunderstand something, but isn't the second picture shows that there is allocation of 11MB for System.Byte[]? – cassandrad Jun 20 '20 at 09:29
  • Yep it is. System.byte[] takes 11 mb which is allocated on LOH according to Second picture and this is theoretically correct too. My question is that why in the first picture LOH size is shown 3MB.i cannot understand this contradiction. – kchahat20 Jun 21 '20 at 13:41

0 Answers0