Search code examples
memorygarbage-collectionclrwindbgsos

Can I run a .NET garbage collection from WinDbg?


I'm looking into why a managed process is using a lot of memory. Is there a way to run GC.Collect(3) from WinDbg, so that I can focus on the actual memory allocation?


Solution

  • I don't think there is any way to run a .NET garbage collection from WinDbg, but I also don't think it is necessary.

    See Rico Mariani's Performance Tidbits - Tracking down managed memory leaks (how to find a GC leak) for information about finding out what kind of stuff is on your heap.

    Additional possibly useful links: