I have a big .NET application that is currently hitting a private开发者_如何学Go working set size of 865MB.
So I ran VMMap and saw that the Heap is about 587MB and Managed Heap is only 255MB (also private working set).
Is it normal to have all this unmanaged code using so much memory (that I suppose is being used by the .net runtime)?
Note: I've used WinDbg with SOS extension. The problem is not the memory consumption in the managed heap but the "unmanaged" heap.
Screenshot of VMMap: http://img687.imageshack.us/img687/1529/vmmap.png
More info: Total size: 1487MB Commited: 1359MB Private: 931MB Total WS: 967MB Private WS: 865MB Free (Size): 609MB
Thanks in advance.
yes! unmanaged objects if not freed up properly can even cause more memory to leak. I once found obcconnection object eating up gigs of RAM (it was trying to open/close connections in a loop). so much so that the app would eventually go out of memory and crash.
what unmanaged objects are you dealing with?
Use CLRProfiler (http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a362781c-3870-43be-8926-862b40aa0cd0&DisplayLang=en) to see what objects are on the heap.
Note: The .NET 2.0 version also works with .NET 4.0.
精彩评论