堆内存可视化

Heap Memory Visualization

我想知道是否有一种方法可以可视化(在 Visual Studio 内)我在执行程序期间使用了多少堆内存。

谢谢

在Visual Studio中使用内存使用诊断工具:https://docs.microsoft.com/en-us/visualstudio/profiling/memory-usage?view=vs-2019

The Memory Usage tool lets you take one or more snapshots of the managed and native memory heap to help understand the memory usage impact of object types. You can collect snapshots of .NET, native, or mixed mode (.NET and native) apps.

这里还有一篇关于其用法的精彩博客文章:https://devblogs.microsoft.com/visualstudio/analyze-cpu-memory-while-debugging/