c# - Windows 上任何单个进程可以处理的最大内存量

标签 c# windows memory limit

Memory Limits for Windows Releases回答 Windows 上任何单个进程可以处理的最大内存量是多少:

On 32-bit versions of Windows, a single process can map and address no more than 3GB of virtual memory at time. In 64-bit versions of Windows, a 32-bit process can map and address no more than 4GB of virtual memory at a time.

For 64-bit processes, the amount is difficult to calculate as there are numerous overlapping limits that could apply depending on all kinds of factors. It's typically around 7TB.

我的问题:如何验证“3GB”、“4GB”等值?

可以编写一个 C# 程序来证明它吗?有办法吗?

最佳答案

Mark Russinovich 发表了一个关于 windows 内存资源的多部分系列,确实很好地涵盖了这一点。你可以在这里找到它: http://blogs.technet.com/b/markrussinovich/archive/2008/07/21/3092070.aspx

他介绍了限制的原因以及测试。测试代码在某处的 pipe 里飘来飘去。

如果您想了解内存资源以及从泄漏各种类型中可以看到的问题,这是一本不错的书。

但是,简而言之,32 位操作系统上的 32 位:2 GB,除非设置为大地址空间感知,在这种情况下为 3 GB。 64 位操作系统上的 32 位:2 GB,除非设置为大地址空间感知,在这种情况下为 4 GB。

64 位进程:2 GB,除非设置为大地址空间感知,在这种情况下,它可以寻址高达 8 TB,除非它托管在限制为 7 TB 的基于 Intel Itanium 的系统上。

Microsoft 在以下位置说明了各种限制(按风格和类型): http://msdn.microsoft.com/en-us/library/aa366778.aspx

关于c# - Windows 上任何单个进程可以处理的最大内存量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11891593/

相关文章:

windows - Windows 可以检测显示器、鼠标、键盘何时断开连接吗?

python - 如何存储多次使用的字典数据?

c# - XNA:当前顶点声明不包括当前顶点着色器所需的所有元素。 Normal0 丢失

c# - 如果不解释 C#,那么为什么需要 VM?

windows - Chocolatey 和 powershell : pin and unpin programs from task bar and file associations

c++ - 如何确定应用程序正在使用哪个监视器以及如何获取它的句柄?

assembly - 将寄存器加载到自身的指令的目的是什么?

python - 如何从内存中删除 SQLAlchemy 实体的延迟属性?

c# - 为什么不建议在 .NET Reactive Extensions 中使用 Subjects?

c# - Linq 排序的一些改进