Using VS2010 Profiler for memory measurement

后端 未结 1 1132
野趣味
野趣味 2020-12-16 21:47

I\'m looking for using Built-in Visual Studio 2010 Profiler for measure memory usage of my C# functions in a Windows application program, but I could not know how.

I

相关标签:
1条回答
  • 2020-12-16 22:24

    (Full disclosure: I'm on the team that works on this feature.)

    The VS2010 Profiler is only available in the Premium and Ultimate editions. There are a number of resources for doing managed memory profiling. Some are older, but still relevant:

    • Blog: The Object Allocation and Object Lifetime views
    • Blog: What code path is allocating the most bytes for a type?
    • Blog: Using VSTS 2008 memory allocation profiling
    • MSDN: Collecting .NET Memory Allocation and Lifetime Data

    Object allocation profiling will show you where objects were allocated as well as aggregate statistics (size and count) for each type allocated. Object lifetime shows you when objects were collected (Gen 0, 1, 2) as well as whether or not the object was in the Large Object Heap.

    0 讨论(0)
提交回复
热议问题