dotMemory and unmanaged memory

Answered

I am trying to track down a memory leak.  Analysis with dotMemory shows that it is unmanaged memory that is leaking.  However, I have no low level API calls, no COM+ calls, etc.  How can I figure out what this is?  dotMemory does not appear to do any analysis of unmanaged memory.

 

Thanks.

 

 

 

5 comments
Comment actions Permalink
Official comment

Hello Steve,

Unfortunately, our profiler core contains a memory leak which appears when allocations collecting is enabled.

Could you please disable allocation data collecting and start profiling your application? If unmanaged memory does not increase constantly when allocations collecting is disabled, unmanaged memory in your application does not leak.

You're welcome to track issue progress:

https://youtrack.jetbrains.com/issue/DMRY-3915

Sorry for inconvenience.

dotMemory doesn't allow to analyze unmanaged memory for now, it is pure .NET profiler. We have a feature request about it:

https://youtrack.jetbrains.com/issue/DMRY-2148

You are welcome to comment or vote for it.

Comment actions Permalink

FYI, issue DMRY-3915 indicates that the leak has been addressed in 2017.1 (although there is still no support for diagnosing memory issues from unmanaged code).

0
Comment actions Permalink

Paul,

Yes, issue with increasing unmanaged memory is fixed in 2017.1 version. Are you still experiencing it?

We do not plan to implement "unmanaged memory profiling" feature in the near future.

0
Comment actions Permalink

No, that part is good now.  I am experiencing a slow growth of unmanaged memory that does not appear to be related to dotMemory.

I did report a second problem, a crash in dotMemory (in DMRY-4752) that has now been fixed in the upcoming 2017.1.3 hotfix update.  (Excellent response on that one!)

In this case, I was trying to use dotMemory to identify the source of the problem, however that was not effective since it was a leak/problem in allocations from unmanaged code. So I came here looking for answers, and found that there appears to be absolutely no support whatsoever for diagnosing unmanaged memory in dotMemory, as you already indicated above.  For memory leaks from unmanaged library code, I'm now forced to look at other products, as I indicated in DMRY-2148. This is very disappointing, but I understand the complexities and scale of this feature request.  (I implemented an alternative unmanaged heap and tracker in my former job.) However, this is specifically a memory diagnostic tool for .NET apps, a commercial product, and diagnosing only memory allocated from managed memory in a .NET app is an incomplete product. I hope that it's at least a goal somewhere for the 2018 updates to address that gap.

0
Comment actions Permalink

Paul,

dotTrace version 2016.3 and later has a "Native Memory Allocation" filter, probably it can help you in some cases.

You can read more about this feature here:

https://blog.jetbrains.com/dotnet/2017/01/23/analyzing-native-memory-allocation-with-dottrace-2016-3/

We'll be pleasured if you try this feature and express your comments about it.

0

Please sign in to leave a comment.