WinDbg MEM_COMMIT for 1GB, eeheap shows 150MB, can't find any remaining memory

I am having problems trying to find some unmanaged memory allocation from a .dmp file.

I try to follow the advice - here but I find a beat of the wall

! address -summary gives me below, which shows that MEM_COMMIT is at 1.030Gb, which is expected (please ignore TB of memory, this is probably due to the fact that this is from a virtual network server)

Address Summary

! eeheap -gc gives me below, which shows .net memory usage is 150MB (if I run ! eeheap on my own, I don't see any extra heaps, I still see 8 GC heaps which are 150MB)

eeheap

This makes me think that most of the memory usage comes from unmanaged memory

The instructions I followed then say to use ! heap -s to find where the unmanaged memory is. When I do this I see below

heap -s

Now, I would expect a large heap of memory to be used by the heap, which I could further analyze to try and find unmanaged memory, but I don't see the heap that is close to filling, showing 1 GB of used memory

I noticed that ! address -summary showed 600MB in PAGE_READWRITE, so I tried it ! address / f: PAGE_READWRITE which I was hoping would give me something else to continue with, but it gives me the memory list used by PAGE_READWRITE and I'm not too sure how to parse further

Basically, I want to know where the memory difference between 1GB and 150MB of .net distributed memory is used.

Any help would be great

+3


source to share


1 answer


In the "Usage Summary" you can see

<unknown>  17 GB
Heap       235 MB

      

<unknown>

could be .NET or memory directly allocated VirtualAlloc()

. IMHO someone using VirtualAlloc()

directly is pretty rare.

Heap

- memory allocated through the heap manager. Thus, it !heap -s

does not display more than 235 MB.



MEM_COMMIT

is just a different state of memory, and it can be in any of the usage states. To find 1GB of memory, you need to summarize everything you have:

154 MB used by .NET GC Heaps
235 MB used by Heaps
234 MB used by Images
up to 50 MB in Stacks
... some smaller parts not really relevant

      

This already explains 620 to 670 MB of memory, depending on how much was actually committed to the stack.

If you execute !eeheap

without a parameter -gc

, you will see that .NET uses more memory as it also has LoaderHeaps, JIT Heaps, domain heaps, etc.

+2


source







All Articles