Using the Microsoft Common Language Runtime Profiler

The memory allocation profile of the application that you have written can be investigated by using the CRL Profiler. The efficiency of the garbage collection and the memory leaks can tracked down with the use of the CLR Profiler.

It is possible to isolate the code that creates the problems such as memory leak and rectify them. Some of your code could allocate too much of memory and induce too much of garbage collection. Sometimes your code could hold on the memory for a longer time.

These problems can be identified with the help of the CLR Profiler. Do not use the CLR Profiler in the production environment. Using the CLR Profiler might slow down your application up to 100 times. When you run the CLR Profiler you are presented with different types of view which you can make use of to track the problems.

Some of the views available are Histogram Relocated Types, Histogram by Age, Histogram Allocated Types, Objects by Address, Call Graph, Allocation Graph, Heap Graph, and Time Line.

The CLRProfiler.exe is the file needed to run the CLR Profiler and you can download this self-extracting executable from the Microsoft website.