GC.GetTotalMemory vs. Process.PeakPagedMemorySize64

  • Thread starter Thread starter rick
  • Start date Start date
R

rick

The Task Manager reflects the PeakPagedMemorySize64 value but
GC.GetTotalMemory a totally different. Currently my C# windows service
is reporting 596,439,040 for PeakPagedMemorySize64 and continues to
rise (the app has been running 2 days now) and the GC is reporting
14,292,520 and fluctuates up and down. Do I have a memory leak? Is
this normal? We have noticed that once the Task Manager is showing one
Gb, the Windows 2003 IIS craps out and stops responding to requests. I
am closing all ADODB connections in the calling method and setting all
objects to null after use. There are no COM calls or unmanaged code. I
am also using WMI. The application as starts threads.

Thread oThread = new Thread(new
ThreadStart(poJob.Run));
oThread.Start();
 
Hi Rick,

I may be wrong but I believe that the GC only reflects the amount of managed
memory in use, not necessarily any unmanaged memory that's been allocated.
It sounds to me like you have are leaking unmanaged memory somewhere. Are
you disposing all of your objects correctly? I believe WMI is actually
unmanaged so maybe you're leaking something there?

Kind Regards,
Alex
 
Back
Top