Windows App Memory Measurement

 

Windows application 内存使用分析

 

一. windows 存储系统:物理存储器分为三类:

 

1. 物理内存:RAM存储器,即通常说的电脑内存;

2. 页交换文件(paging file):硬盘上提供的虚拟内训;

     可以通过以下方式来改变页交换文件的大小:

     

3. 内存映射问文件(memory-maping file): 存在于硬盘上的文件(EXE/DLL/Data).

 

二. Windows application内存使用分析指标

 

1. Virtual Size:

 

The current size, in bytes, that has been reserved, of the virtual address space for this process. The virtual address   space limit of a user mode process is 2 GB, unless 3 GB address space is enabled by using the /3GB switch in boot.ini for 32-bit Windows.

 

2. Private Bytes:

 

The current number of bytes this process has committhat cannot be shared with other processes.

It does not include the shared memory, such as EXE, DLL and memory-mapped file.

 

3. Working Set:

 

The set of memory pages (areas of memory commit to a process) recently usedby the threads in a process.

It include the shared memory with other process, such as memory-mapped file, various other resources.

它分为2部分: private working set: 不包含共享内存在内的正在使用的物理存储器;

                         sharable working set: 可以共享的正在使用的物理存储器;

 

If available memory on the server is above a specified threshold, pages remain in the Working Set of a process even if they are not in use. When available memory falls below a specified threshold, pages are removed from the Working Set. If these pages are needed, they will be returned back to the Working Set before they leave main memory and are made available for other processes to use.

4. 一些结论:

 

(1)Virtual Size 一定大于或等于Private BytesWorking Set

(2)在共享数据不多的情况下,一般Private Bytes  大于Working Set

(3)在共享数据比较多的情况下,Working Set 大于 Private Bytes ;

 

 三. App内存使用分析工具

1. Process Explore

使用此工具可以直接看到3项纪录:

 

2. Windows Task Manager

VM Size(提交大小) : private bytes

Memory Usage(工作设置(内存)): working set

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值