-5

I cant find information about Large Objects Heap. Everywhere is wrote that it isn't fragmented. But I heard that isn't collected.

I cant find some article which provide me this information.

So, is LOH collected (dead instances removed from memory) or isn't?

Alexei Levenkov
  • 98,904
  • 14
  • 127
  • 179
Jakub Čermoch
  • 431
  • 1
  • 9
  • 20
  • Google `LargeObjectHeapCompactionMode` and see http://blogs.msdn.com/b/dotnet/archive/2011/10/04/large-object-heap-improvements-in-net-4-5.aspx and https://msdn.microsoft.com/en-us/library/system.runtime.gcsettings.largeobjectheapcompactionmode%28v=vs.110%29.aspx – Matthew Watson Nov 10 '15 at 16:12

1 Answers1

4

The large object heap is collected as well. I don't know where it says that it isn't fragmented. That's not true. It isn't compacted by default though.

If you want to override the default behavior you can set the LargeObjectHeapCompactionMode flag, but keep in mind that compacting a large heap can be very time consuming.

Brian Rasmussen
  • 114,645
  • 34
  • 221
  • 317