Re: Tracing Program Memory Usage
- From: Stewart Berman <saberman@xxxxxxxxxxxxx>
- Date: Mon, 20 Jul 2009 13:08:47 -0400
The value returned by the VirtualMemorySize64 property represents the
current size of virtual memory used by the process. The operating system
Actually, as described, I would be interested in the VirtualMemorySize64 value as the working set
size would not necessarily show a memory leak since the leak would probably not be referenced and
thus would be paged out.
jiewan@xxxxxxxxxxxxxxxxxxxx ("Jie Wang [MSFT]") wrote:
| Hi,.
|
| You need to change what you are using in your code:
|
| Task Manager "Mem Usage" column = WorkingSet64
| Task Manager "Peak Mem Usage" column = PeakWorkingSet64
| Task Manager "VM Size" column = PrivateMemorySize64
John is right.
The value returned by the VirtualMemorySize64 property represents the
current size of virtual memory used by the process. The operating system
maps the virtual address space for each process either to pages loaded in
physical memory, or to pages stored in the virtual memory paging file on
disk. It looks normal in the size that you showed.
To get the physical memory in use, the WorkingSet64 property is the right
way to go.
Reference:
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.virtualme
morysize64.aspx
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.workingse
t64.aspx
Regards,
Jie Wang
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business days is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
- Follow-Ups:
- Re: Tracing Program Memory Usage
- From: "Jie Wang [MSFT]"
- Re: Tracing Program Memory Usage
- References:
- Tracing Program Memory Usage
- From: Stewart Berman
- Re: Tracing Program Memory Usage
- From: John
- Re: Tracing Program Memory Usage
- From: "Jie Wang [MSFT]"
- Tracing Program Memory Usage
- Prev by Date: Re: BackgroungWork taske ended for no appearent reason
- Next by Date: Re: Notify Icon Vanishes From Tray
- Previous by thread: Re: Tracing Program Memory Usage
- Next by thread: Re: Tracing Program Memory Usage
- Index(es):
Relevant Pages
|