2

我有一个内存需求非常大的 32 位应用程序。

我注意到有一个叫做Address Windowing Extension的东西。

但是,我没有找到太多关于如何使用它的信息,以及在使用它时可能遇到的缺点和问题?

4

2 回答 2

0
  • It shouldn't work on versions of Windows at 64bits (read here http://msdn.microsoft.com/en-us/library/aa366778.aspx Intel and AMD's specification of PAE does support the x86-64 architecture but the software layer of Microsoft's PAE (the API), called AWE, is not supported on 64 bit editions of Windows, so Windows Vista 64 bit cannot attribute more than 4 GiB of RAM for a 32 bit application.).
  • Even on Windows 32 bits there is a "license" limit on the amount of memory usable (same page shows all the limits).
  • And clearly it's complex to program :-) It's like using EMS on the old 8086.
于 2011-09-02T10:27:07.210 回答
0

事实上,您可以在 64 位 Windows 操作系统中运行的 32 位应用程序中使用 AWE,而且您不需要 PAE。例如 MS SQL Server(2012 之前的版本)可以在此模式下配置。

但除非您有非常具体的要求,否则移植到 64 位可能是更好的选择。

你有几个缺点:

  • 需要与用户一起运行SeLockMemoryPrivilege
  • 内存不能与其他进程共享。它分配在物理内存中。为操作系统和其他应用程序留下更少的内存(使用AllocateUserPhysicalPages)。
  • 您需要一个虚拟地址才能访问此类内存。所以你可以有一个带有LARGE_ADDRESS_AWARE标志的 4GiB 内存窗口。
  • 如果您想访问超过 4GiB,则必须映射/取消映射这些物理页面(使用MapUserPhysicalPages)。

这篇1999 年的文章解释了如何使用此类 API。

于 2014-04-20T03:28:03.960 回答