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?
相关问题
- What uses more memory in c++? An 2 ints or 2 funct
- C# GC not freeing memory [duplicate]
- garbage collection best practices
- Memory for python.exe on Windows 7 python 32 - Num
- Analyzing Outlook HANG dump (with GoogleCalendarSy
相关文章
- Why are memory addresses incremented by 4 in MIPS?
- Is my heap fragmented
- Why do we need Dispose() method on some object? W
- On scala project - Getting error GC overhead limit
- Is there a way to avoid this memory error?
- Azure Web App Temp file cleaning responsibility
- Is there a way to release unmanaged resources when
- How do I store a Python object in memory for use b
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.
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:
Hey Roger, Hopefully your memory leak is resolved by now. :-)
I would first be sure that it is "managed memory leak". By that I mean that when you look at Performance Monitor counters .NET CLR Memory -> # Bytes in all heaps is increasing at the same rate as the Process -> Private Bytes counter for the same process. If it is, then you can use the techniques described above.
If it is not, you may have a native leak that is a result of running managed code. The most common that I have see is related to .NET Assemblies being loaded in the process and not unloaded. This looks like a native memory leak in Perfmon.
I would suggest that you try running a Leak Rule in DebugDiagand see what the memory report shows as the leaking callstacks.
Here is another great resource on the subject: I have a memory leak!!! What do i do? (defining the "where")
Thanks, Aaron
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: