S
Stewart Berman
Windows XP SP3 32bit with all patches
..Net 2.0 with all patches
VS 2005 with all patches.
I am trying to track the memory use of an application. I put the following code in a function that
is called every 45 minutes:
process = process.GetCurrentProcess()
lMemoryInUse = process.VirtualMemorySize64
lMemoryInUsePeak = process.PeakVirtualMemorySize64
process.Dispose()
process = Nothing
TraceWriteLine(Format$(Now(), "yyyyMMdd HH:mm:ss.fff: ") & "Memory in use: " &
lMemoryInUse.ToString() & ", Peak Memory in use: " & lMemoryInUsePeak.ToString())
The trace output has:
20090719 17:49:18.375: Memory in use: 150937600, Peak Memory in use: 166055936
However, Task Manager shows the following for the application:
Mem Usage: 5,980 K
Peak Mem Usage: 65,060 K
VM Size: 18,912 K
Why is the memory usage obtained from the process so much larger than what Task Manager shows?
..Net 2.0 with all patches
VS 2005 with all patches.
I am trying to track the memory use of an application. I put the following code in a function that
is called every 45 minutes:
process = process.GetCurrentProcess()
lMemoryInUse = process.VirtualMemorySize64
lMemoryInUsePeak = process.PeakVirtualMemorySize64
process.Dispose()
process = Nothing
TraceWriteLine(Format$(Now(), "yyyyMMdd HH:mm:ss.fff: ") & "Memory in use: " &
lMemoryInUse.ToString() & ", Peak Memory in use: " & lMemoryInUsePeak.ToString())
The trace output has:
20090719 17:49:18.375: Memory in use: 150937600, Peak Memory in use: 166055936
However, Task Manager shows the following for the application:
Mem Usage: 5,980 K
Peak Mem Usage: 65,060 K
VM Size: 18,912 K
Why is the memory usage obtained from the process so much larger than what Task Manager shows?