Re: Tracing Program Memory Usage

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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.

.



Relevant Pages

  • Re: Tracing Program Memory Usage
    ... The value returned by the VirtualMemorySize64 property represents the ... current size of virtual memory used by the process. ... Microsoft Online Community Support ... nature are best handled working with a dedicated Microsoft Support Engineer ...
    (microsoft.public.dotnet.languages.vb)
  • Re: OutOfMemoryException on String.Concat
    ... physical RAM, and ran out of virtual memory space. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework)
  • Re: multithreaded tcp/ip server large page file
    ... I'd like to see some documentation on the statement that each new thread consumes 1MB virtual memory. ... The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Source code for s/360
    ... hardware modifications to support virtual memory. ... when standard virtual memory became available with 360/67 ... ... implementing 370 virtual machines (supporting ... machine datacenters were set up as part of "HONE" ... ...
    (bit.listserv.ibm-main)