I suggest you ...

LOH compaction

It is an absolute disgrace that LOH compaction is not included in the CLR (GC). Please make every effort to include this feature in future versions

18 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    AnonymousAnonymous shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
    Anonymous shared a merged idea: GC.CompactLargeObjectHeap()  ·   · 

    2 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • KevinKevin commented  ·   ·  Flag as inappropriate

        This feature is absolutely essential for our software. We render WPF images on background threads, use large BitmapSource's, very large arrays (6 million long[]), and even though our memory usage is 300 MB, we get OOM exceptions due to LOH fragmentation. Thanks for implementing this feature!

      • sdormansdorman commented  ·   ·  Flag as inappropriate

        GC compaction uses a very low-level memcpy C runtime command which becomes more expensive as the amount of memory being moved increases. The LOH is given special treatment to not compact so it avoids this performance hit. It also has a lot of logic to reuse the "holes" created by freeing memory in the LOH so compaction isn't as important.

      Feedback and Knowledge Base