I am writing a C # analysis application that has to deal with large memory. I am using ANTS Memory Profiler 7.4 to optimize memory management. At the same time, I realized that all of my double [,] arrays that I use (and I need them) are placed in LOH, although the largest of these arrays is about 24,000 bytes. As far as I know, objects should not be up to 85,000 bytes. The problem is that since I have about several thousand instances of these double [,] arrays, I have a lot of memory fragmentation (about 25% of the total memory usage is free memory, which I cannot use). some of these arrays stored on the LOH are only 1,036 bytes in size. The problem is that sometimes I have to do more analysis and then I get a memory exception due to huge memory loss due to LOH fragmentation.
Does anyone know why this happens, although by definition it should not be a large object?


Oliver bernhardt
source share