简体   繁体   English

64位Windows上的应用程序可使用的最大内存是多少?

[英]What is the maximum memory available to an application on 64-bit Windows

I am getting this question all the time from my users, unfortunately I have not found good links about x64 (x86 is a different story). 我一直在从用户那里收到这个问题,不幸的是,我还没有找到关于x64的良好链接(x86是另一回事)。

What is the maximum memory available to an application on 64-bit Windows: 64位Windows上的应用程序可使用的最大内存是多少:

  1. C++ application C ++应用程序
  2. .Net application .NET应用程序
  3. .Net application using C++ libraries 使用C ++库的.Net应用程序
  4. Application is running on Windows 2008 /2012 server 应用程序正在Windows 2008/2012服务器上运行
  5. Application is running on Windows 7/8 应用程序正在Windows 7/8上运行

The total amount would be - in theory - a bit over 18 quintillion (2^64 or 18 billion billion) bytes or 18 billion gigabytes assuming addresses are considered to be unsigned. 如果理论上认为地址是无符号的,则总的数量在理论上将超过18 quintillion(2 ^ 64或180亿亿字节)或180亿千兆字节。 If you limit yourself and consider a signed 64 bit integer, then you're looking at half of that. 如果您限制自己并考虑一个有符号的64位整数,那么您只需要查看其中的一半。 Oh, and don't forget to subtract memory that's going to be reserved for hardware, like video ram, address space for busses, etc. 哦,别忘了减去将保留给硬件的内存,例如视频ram,总线的地址空间等。

But even these numbers aren't necessarily the maximum (at least theory wise), because there are additional tricks you're able to pull off (like using physical address extension to use more than 2 GB on 32 bit). 但是,即使这些数字也不一定是最大数字(至少在理论上是这样),因为您还可以使用其他技巧(例如使用物理地址扩展在32位上使用2 GB以上的内存)。

So, essentially as the short answer: 64 bit allows you to address and use all the memory your money can buy. 因此,从根本上来说,这是一个简短的答案:64位允许您寻址和使用您可以用钱购买的所有内存。

Unfortunately there are most likely hardware and software limits that are much lower, for example the maximum amount of memory being useable by your mainboard (depending on the age of the board, right now would usually be 8 or 16 GB, sometimes 32 GB). 不幸的是,最可能的硬件和软件限制要低得多,例如,主板可以使用的最大内存量(取决于主板的年龄,目前通常为8或16 GB,有时为32 GB)。 Judging by Windows itself, the maximum amount can vary greatly, based on your architecture and version you're running. 从Windows本身来看,最大数量可能会根据您所运行的体系结构和版本而有很大差异。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM