32 位程序可以在 64 位操作系统上使用超过 4GB 的内存吗?

32 位程序可以在 64 位操作系统上使用超过 4GB 的内存吗?

问题描述:

在 64 位操作系统上运行的 32 位程序是否能够使用超过 4GB 的内存(如果可用)?

Is a 32-bit program running on a 64-bit OS able to use more than 4GB of memory if available?

简短的回答是:是的.更长的答案取决于.页面重新映射有硬件支持,这基本上为您的程序提供了一个将几页的窗口放入更大的内存区域.然而,这个窗口应该由程序本身管理,不会得到内存管理器的支持.有一些程序的例子,比如 Windows 上的 SQL.但是,总的来说这是一个坏主意,程序应该将自身限制为 4GB 或移动到 64 位 :)

Short answer is: yes. Longer answer is depends. There is a hardware support for page re-mapping, which basically gives your program a window of a few pages into a larger area of memory. This window is however, should be managed by the program itself and will not get support from memory manager. There are examples of programs doing that like SQL on Windows. However, in general it is a bad idea and the program should either limit itself for 4GB or move to 64bits :)