windows 工作集和提交大小有什么区别?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7954781/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
what's the difference between working set and commit size?
提问by user705414
when debugging OOM bugs, what's the difference between working set and commit size? Especially what's the exact meaning for commit size?
在调试 OOM 错误时,工作集和提交大小之间有什么区别?特别是提交大小的确切含义是什么?
回答by CodeNaked
From here, the working set is:
从这里开始,工作集是:
... a count of physical memory (RAM) rather than virtual address space. It represents the subset of the process's virtual address space that is valid, meaning that it can be referenced without incurring a page fault.
... 物理内存 (RAM) 而不是虚拟地址空间的计数。它代表有效的进程虚拟地址空间的子集,这意味着它可以被引用而不会导致页面错误。
The commit size is:
提交大小为:
the total amount of pageable virtual address space for which no backing store is assigned other than the pagefile. On systems with a pagefile, it may be thought of as the maximum potential pagefile usage. On systems with no pagefile, it is still counted, but all such virtual address space must remain in physical memory (RAM) at all times.
除了页面文件之外没有为其分配后备存储的可分页虚拟地址空间的总量。在具有页面文件的系统上,它可能被认为是最大的潜在页面文件使用量。在没有页面文件的系统上,它仍然被计算在内,但所有这些虚拟地址空间必须始终保留在物理内存 (RAM) 中。
So you can think of the working set as the amount of physical memory used, while the commit size indicates the amount of virtual memory used (sans things like DLLs or memory mapped files, which can be back by files other than the page file).
因此,您可以将工作集视为使用的物理内存量,而提交大小表示使用的虚拟内存量(不包括 DLL 或内存映射文件之类的东西,这些文件可以由页面文件以外的文件返回)。
That said, these numbers are not generally useful when trying to find "memory leaks" in .NET. Instead, you should use third-party memory profilers.
也就是说,在 .NET 中尝试查找“内存泄漏”时,这些数字通常没有用。相反,您应该使用第三方内存分析器。