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?
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:
I do not believe that you can trigger a GC from WinDbg.
Here are some useful tools that I have come to rely on for memory allocation tracking:
WinDBG is first and foremost a Win32/Kernel Debugger. So you may want to try one of the managed debuggers, like mDBG. But I used to do .NET Debugging support for MSFT, and I've never needed anything like that to troubleshoot memory leaks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With