Search code examples
c#.netuwpmemory-leaksunmanaged-memory

Unmanaged Memory Profiling for UWP applications?


I have been on the search to find a tool or a technique or anything that could help me find which objects from my UWP application is allocating on unmanaged heap memory.

I tried looking at WPR/WPA combination for tracing object. But, did not find anything useful there. (If you have any good links for UWP/WPF apps with this combo, please share)

I installed Ant Memory profiler, but they do not seem to have any option for Windows Store apps anymore.

I checked .NET memory profiler, when I try to load "Windows Store App" .. .NET profiler keeps being stuck at "Trying to load .NET memory"... stays stuck.

I am looking for any way/technique/tool that could help me have an understanding of the unmanaged memory leak issues.

The Application I am working on... it has .NET core components, Native CPP component, UWP components, it's hard to trace where the memory leak issue is occurring without any broad strokes hint.

(PS: Currently, I am trying to check if I can do anything with WinDbg for analyzing heapdump of UWP app)

Thank you for reading.


Solution

  • When app is built in Managed + Native mode..

    From Diagnostic Tools and Performance Profiler.. it is possible to trace

    Native memory using the Heap Profile feature.

    enter image description here

    enter image description here

    But, caution, turning heap profiling on turns the application super slow... so, the duration of test should be limited as later when analyzing the recorded profile.. it will take further time.