Hidden allocation call stacks

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
erik

Hidden allocation call stacks

Post by erik » Wed Jun 15, 2011 4:07 pm

I am using Memory Profiler to analyze unmanaged memory allocations. I have symbols configured correctly and I set the following options:
- disable stack reducer
- set maximum stack depth to (unlimited)
- enable perform native stack walk
- enable perform stack walk on managed entry

On the Resource details tab, I've selected "Kernel-HeapMemory" as the Resource. The page lists 1000s of instances, some of which are dimmed. When I select the dimmed instances, the Call stack view displays the message "Allocation call stack is hidden for the selected instance(s)", regardless of the state of the "Hide stacks with zero sort value" checkbox or the "Sort stacks by" combobox.

1) Why are these call stacks hidden for these instances? Is there any way to see these call stacks?
2) The list of instances is truncated because there are so many. Is there any way to see the instances that not shown because of the truncation?

Thanks,
-Erik

Andreas Suurkuusk
Posts: 1028
Joined: Wed Mar 02, 2005 7:53 pm

Re: Hidden allocation call stacks

Post by Andreas Suurkuusk » Sun Jun 19, 2011 2:13 pm

To avoid presenting duplicate memory usage, .NET Memory Profiler will hide nested memory allocations. For example, when you make a call to the C function malloc, the malloc function will call the Win32 function HeapAlloc. Both of these functions are tracked by the profiler, but the memory allocated by the nested call to HeapAlloc will be ignored when aggregating total instances and bytes count. If the nested allocation wasn't ignored, then twice as much memory would be reported as allocated.

In the instance list, even the ignored instances are presented, but they are dimmed. However, they are not included in the call stack summary presented to the right, so the call stack will always be hidden for the ignored instances. To get call stack information for the ignored instances, you will need to double-click the instance and view the instance details.
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests