当前位置: 动力学知识库 > 问答 > 编程问答 >

c++ - 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).

What is the maximum memory available to an application on 64-bit Windows:

  1. C++ application
  2. .Net application
  3. .Net application using C++ libraries
  4. Application is running on Windows 2008/2012 server
  5. Application is running on 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. If you limit yourself and consider a signed 64 bit integer, then you're looking at half of that. Oh, and don't forget to subtract memory that's going to be reserved for hardware, like video ram, address space for busses, etc.

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).

So, essentially as the short answer: 64 bit allows you to address and use all the memory your money can buy.

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). Judging by Windows itself, the maximum amount can vary greatly, based on your architecture and version you're running.

分享给朋友:
您可能感兴趣的文章:
随机阅读: