Memory allocation profilers for managed and unmana

2019-07-15 09:27发布

问题:

My application runs a combination of C++ (COM objects) and C# managed code. Sadly there is a n elusive memory leak I need to trace down.

I've tried AQTime, which looked good on paper, but my app keeps crashing when running underneath it.

Any suggestion for a better alternative?

回答1:

Massif is a heap analyzer, part of the Valgrind project, that should work well for profiling allocations in unmanaged code. If your heap is managed by a runtime (e.g. managed code), you will need to be more specific about the runtime you are using. There is a list of Java memory profilers here, and a couple popular .Net memory profilers are SciTech's .Net Memory Profiler (14-day trial) and RedGate's ANTS Profiler (also with a free trial), but more expensive (and with more features) for the full version.