Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
507 views
in Technique[技术] by (71.8m points)

c# - Using VS2010 Profiler for memory measurement

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 searched the net about how to use VS2010 Profiler, but all links suggest using Silverlight which is related to Web application not Windows Application

Please if any one can tell me how to use VS2010 Profiler in C# Windows application, or send me a link or tutorials or any hint if something is missing, and thanks alot

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

(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:

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...