Debug Diag Output
- I have an application that is increasing its private memory usage over time until eventually it runs out of memory. When the application is shutdown and restart the clock is reset in terms of memory. The fragmentation on the hraddrive also appears to increase. How can I tell from the debug diag output waht is causiong the memory increase...also how can I attach the output to this forum?
Answers
- If it is managed memory leak, then use the link I sent earlier.
If it is native memory leak, I am not sure why did you post your question here in .NET forums. In that case try to search internet - there are numerous articles on this topic and some decent support in CRT (see e.g. Memory Leak Detection and Isolation on MSDN or How to manage memory leaks on codeguru).
If you are looking for DebugDiag tool help, then this is wrong forum as well. Try to search the internet in such case, there seem to be some blog posts about it too.
-Karel- Proposed As Answer byKarel ZikmundMSFT, ModeratorWednesday, October 28, 2009 5:17 PM
- Marked As Answer byKarel ZikmundMSFT, ModeratorThursday, October 29, 2009 1:25 AM
- Hi,
A previous post has given some useful tools for native memory leak issue, for example:
1. UMDH http://support.microsoft.com/kb/268343
2. LeakDiag http://mcfunley.com/cs/blogs/dan/archive/2005/12/11/674.aspx
3. Debug CRT http://msdn.microsoft.com/en-us/library/x98tx3cf.aspx
4. WinDbg
...
Thanks,
Eric
Please remember to mark helpful replies as answers and unmark them if they provide no help.- Proposed As Answer byKarel ZikmundMSFT, ModeratorWednesday, October 28, 2009 5:16 PM
- Marked As Answer byKarel ZikmundMSFT, ModeratorThursday, October 29, 2009 1:25 AM
After a little bit of browsing I found this - it should give you the answer: http://thetweaker.wordpress.com/2009/04/09/native-memory-leaks-part-1-leakdiag/
- I’m actually not sure how public this tool is. Two of its components, LeakDiag and LDGrapher are available on the public MS FTP, but a third one, LDParser, seems to be available only by Microsoft Premier Support. Anyway, both LDParser and LDGrapher only format the output, and LDGrapher can do most (but not all!) of what LDParser does.
- Marked As Answer byKarel ZikmundMSFT, ModeratorWednesday, November 04, 2009 9:44 PM
All Replies
You have likely a memory leak in your application. Use a memory profiler or other techniques to track it down - search for "How to debug memory leak in .NET" on your favourite search engine.
For example this article might help: http://www.codeproject.com/KB/dotnet/Memory_Leak_Detection.aspx
-Karel- Hi Karel
I know it is an unmanaged leak sense the pivate bytes is increasing ovr time but the .Net and no. bytes in all heaps is not. Iam trying to figure what within the unmanaged memory is leaking and how to determine this using debug diag? I can also using the virtual memory display that the private area is increasing in space over time but it does not tell me what in memory is causing the increase...any ideas with debugdiag or VMMAP?
(http://www.voyce.com/index.php/2009/07/28/diagnosing-out-of-memory-errors-with-vmmap/) - If it is managed memory leak, then use the link I sent earlier.
If it is native memory leak, I am not sure why did you post your question here in .NET forums. In that case try to search internet - there are numerous articles on this topic and some decent support in CRT (see e.g. Memory Leak Detection and Isolation on MSDN or How to manage memory leaks on codeguru).
If you are looking for DebugDiag tool help, then this is wrong forum as well. Try to search the internet in such case, there seem to be some blog posts about it too.
-Karel- Proposed As Answer byKarel ZikmundMSFT, ModeratorWednesday, October 28, 2009 5:17 PM
- Marked As Answer byKarel ZikmundMSFT, ModeratorThursday, October 29, 2009 1:25 AM
- Hi,
A previous post has given some useful tools for native memory leak issue, for example:
1. UMDH http://support.microsoft.com/kb/268343
2. LeakDiag http://mcfunley.com/cs/blogs/dan/archive/2005/12/11/674.aspx
3. Debug CRT http://msdn.microsoft.com/en-us/library/x98tx3cf.aspx
4. WinDbg
...
Thanks,
Eric
Please remember to mark helpful replies as answers and unmark them if they provide no help.- Proposed As Answer byKarel ZikmundMSFT, ModeratorWednesday, October 28, 2009 5:16 PM
- Marked As Answer byKarel ZikmundMSFT, ModeratorThursday, October 29, 2009 1:25 AM
- Hi thanks for the help, currently tracing with debugdiag and may also try Memory Validator.
- Folks
Any idea where I can get the LDParser? Thanks... - Just search the internet for "LDParser download" ...
Here's the answer: http://www.eggheadcafe.com/forumarchives/windbg/Feb2006/post26115155.asp
-Karel- Proposed As Answer byKarel ZikmundMSFT, ModeratorThursday, October 29, 2009 3:49 PM
- Unproposed As Answer byKarel ZikmundMSFT, ModeratorWednesday, November 04, 2009 9:44 PM
- I have tried this link and done this search already but I cannot locate the LDParser anywhere....any other ideas...this link only gives the leagdiag.msi file...
After a little bit of browsing I found this - it should give you the answer: http://thetweaker.wordpress.com/2009/04/09/native-memory-leaks-part-1-leakdiag/
- I’m actually not sure how public this tool is. Two of its components, LeakDiag and LDGrapher are available on the public MS FTP, but a third one, LDParser, seems to be available only by Microsoft Premier Support. Anyway, both LDParser and LDGrapher only format the output, and LDGrapher can do most (but not all!) of what LDParser does.
- Marked As Answer byKarel ZikmundMSFT, ModeratorWednesday, November 04, 2009 9:44 PM
- Karel
I used leakdiag and tracked the virtual memory allocations it shows a growing trend for a number of stacks. So I used windbg with the mini-dumps from leakdiag it shows that there is severe fragmentation occuring. I also tracked with perfmon, that confirms that the program is eating virtual memory up quickly. I dont have a symbol file/source to identify the specific program item(s) causing this memory usage but once the program is reset periodicaly it is fine. We are also doing de-fragging periodically to mitigate. Thanks for all the help.....


