Leak does not manifest itself when run under profiler

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
adam
Posts: 3
Joined: Mon Jul 11, 2005 10:09 pm

Leak does not manifest itself when run under profiler

Post by adam » Mon Jul 11, 2005 10:23 pm

Hi,

I can make my application crash due to memory leak when repeating a known sequence of steps ~5 times. This behavoir does not occur however when my application is run under the profiler. I can repeat the same steps over and over and the memory is released. What is the profiler doing and how can I make my application do the same thing??

Thanks!

Adam

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

Post by Andreas Suurkuusk » Tue Jul 12, 2005 8:05 pm

The profiler should not affect the way memory is used in your application. The only things that are affected are the timing in your application (the application is running more slowly) and the fact that a full garbage collection is performed when a heap snapshot is collected.

One possibility is that you have a deadlocked thread in your application, and the thread doesn't deadlock while running under the profiler. Deadlock scenarios are affected by the timing of the application, and if you deadlock a method running in the finalizer thread, then all finalizable objects will become uncollectible.

If you can provide more information about your application, and in what way you experience the memory leak, then I might be able to find out why the behaviour of your application is affected by the profiler.
Last edited by Andreas Suurkuusk on Thu Jul 21, 2005 6:40 am, edited 1 time in total.
Best regards,

Andreas Suurkuusk
SciTech Software AB

adam
Posts: 3
Joined: Mon Jul 11, 2005 10:09 pm

Post by adam » Tue Jul 12, 2005 9:04 pm

I think the problem was that I had a massive leak that was crashing the application when run outside of the profiler, but when running in the profiler the app would not crash for whatever reason.

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests