1

We have C#.Net windows application and i need to know how to get the memory consumption details of my application. I already tried System.Diagnostics.Process to get the current process memory information. I need to know how many objects are in memory and also memory consumption details for each objects.

Lucas
  • 3,376
  • 6
  • 31
  • 46
Siva
  • 11
  • 1
  • 2

1 Answers1

1

Please read about Garbage collector and take a look at this article MSDN Article The article shows the members of GC that can show you how to do a few things, how to get the total amount of allocated memory , how many times the GC has collected.

Other than that you'll have to probably use a profiler as given here.

You can also write your own profiler.This could be of help

Community
  • 1
  • 1
Rohit
  • 10,056
  • 7
  • 50
  • 82
  • ya i already used CLR profiler, ANTS profiler to track the memory allocation details. But i need the source code to get the objects and its memory allocation details. – Siva Jul 19 '13 at 10:52
  • @Siva please take a look at my updated answer – Rohit Jul 19 '13 at 10:59