开发者

How to check memory usage of all static objects in a c#.net application [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

I have loads of static object in my application. Want to check the memory usage of all static object , whether they are efficient to lie inside the memory from the time application is created (in mean once the application pool starts or its restarted)

don't want to use any of the tools or exe's , want to have my own Lib to check

Edit Post : Need some s开发者_开发知识库imple way in the code , by which I would be able to trace the memory usage of static methods , members. Using these parameters I would be able manage profiler / monitor for my system


you should use a profile because it is impossible to do is at runtime and bear in mind that the size of an actual object doesn't include the size of any objects it references.

A quick tip (but not accurate) could be to Serialize the object and check the buffer length which should stick to the object size

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜