How to find memory leak after a particular time

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
RaviKamana
Posts: 2
Joined: Thu Sep 13, 2012 9:45 am

How to find memory leak after a particular time

Post by RaviKamana » Thu Sep 13, 2012 9:55 am

Hi,
We are developing a gaming application in which memory leak is happening after a certain period of time,the time cannot be judged. So, is possible to find the leak using the .net profiler. If not then tell me some profilers that are suitable to my situation. :?:
Thank you.

Andreas Suurkuusk
Posts: 1028
Joined: Wed Mar 02, 2005 7:53 pm

Re: How to find memory leak after a particular time

Post by Andreas Suurkuusk » Thu Sep 13, 2012 8:49 pm

Yes, you should be able to find the memory leak using .NET Memory Profiler.

If you can run the application under the profiler you can collect a snapshot after the memory leak has occurred. By investigating this snapshot you will hopefully be able to determine what causes the leak.

You can also try to use the peak snapshot collection feature. Using this feature, you can automatically collect a snapshot when a memory usage peak has been reached. For more information, see http://memprofiler.com/onlinedocs/peaksnapshots.htm.

If you cannot run the application under the profiler for any reason, or if the memory leak quickly causes an OutOfMemoryException, then you can try to create a memory dump file of the application and import it into the profiler. It is possible to configure the ADPlus tool included with "Debugging Tools for Windows" so that it automatically creates a memory dump file when an OutOfMemoryException occurs. If this is something you are interested in, please tell me and I will give you some more information.
Best regards,

Andreas Suurkuusk
SciTech Software AB

RaviKamana
Posts: 2
Joined: Thu Sep 13, 2012 9:45 am

Re: How to find memory leak after a particular time

Post by RaviKamana » Fri Sep 14, 2012 12:47 pm

Hi thanks for your reply.
Actually if i want to get the sequence of snap shots at regular intervals once the profiler is started, is that possible?

Another thing is i want know the function which is taking more time?

Regards,
RaviKamana

Andreas Suurkuusk
Posts: 1028
Joined: Wed Mar 02, 2005 7:53 pm

Re: How to find memory leak after a particular time

Post by Andreas Suurkuusk » Mon Sep 17, 2012 2:46 pm

You can use the auto-collect feature to collect snapshots at regular intervals. You can define the auto-collected snapshots using the Tools->Options command, and then selecting the "Snapshots" page (see screenshot).
autocollect.png
Auto-collect
.NET Memory Profiler does not include a performance profiler, so you cannot get information about function timing.
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests