Unmanaged Memory Leak?

Memory profiling for .NET developers

Moderators: Luke Jefferson, StephenC, AndrewH, melvyn.harbour, james.billings, Laura Morley, dene.boulton

Unmanaged Memory Leak?

Postby aaronkupen » Thu Apr 04, 2013 5:53 pm

I have an C# console application running under the .net 4.0 framework with this and only this code.

Code: Select all
static void Main(string[] args) {
     String line = Console.ReadLine();
}


I'm running ANTS Memory Profiler 7.4 on this application, and have noticed that the unmanaged memory of this application goes up with almost every snapshot. Can anyone explain how to correct this behavior, or provide clarification on why this is happening?
aaronkupen
 
Posts: 3
Joined: Thu Apr 04, 2013 5:45 pm

Postby aaronkupen » Thu Apr 04, 2013 7:31 pm

Forgive me if this is a completely ignorant statement, but during the process of attaching to an application -- does ANTS's memory footprint become a part of the process under test? Does the actual act of collecting and storing data of the desired process actually get inadvertently included in the unmanaged memory analysis?
aaronkupen
 
Posts: 3
Joined: Thu Apr 04, 2013 5:45 pm

Postby jessica.ramos » Fri Apr 05, 2013 7:25 pm

Not at all! :) ANTS does cause some additional memory and processing overhead when you take a snapshot.

In the case of this application though, the increasing unmanaged memory is likely due to the CLR itself...

"The CLR itself uses unmanaged memory. If your application uses very little memory in total, the amount of memory used by the CLR may appear to take up a large percentage of the memory in use by the application.
If the amount of unmanaged memory used in your application is less than about 40MB, the CLR is likely to be the cause. "

(http://www.red-gate.com/supportcenter/c ... anaged_use)

I hope that information helps explain some things!
Jessica Ramos
Technical Support
Red Gate Software Ltd.
jessica.ramos
 
Posts: 235
Joined: Mon Apr 23, 2012 1:13 pm


Return to ANTS Memory Profiler 7

Who is online

Users browsing this forum: No registered users and 0 guests