Address Windowing Extension

筅森魡賤 提交于 2019-12-07 23:56:19

问题


I have an 32bit application with very large memory requirements.

I noticed that there is something called Address Windowing Extension.

However I haven't found much information in regards to how to use it and also what disadvantages and problems one might run into while using this?


回答1:


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



回答2:


Well the truth is that you can use AWE from a 32bits application running inside a Windows OS 64bit, and you don't need PAE. For example MS SQL Server (before 2012 version) can be configured in this mode.

But unless you have a very specific requirements, probably is far a better option to port to 64bits.

You have several disvantages:

  • Need to run with a user with SeLockMemoryPrivilege
  • The memory can not be shared with other process. It is allocated in physical memory. Leaving less memory to the OS and other applications (with AllocateUserPhysicalPages).
  • You need a virtual address in order to access such memory. So you can have a memory windows of 4GiB with LARGE_ADDRESS_AWARE flag.
  • If you want to access more thant 4GiB you have to map/unmap those physical pages (with MapUserPhysicalPages).

This article from 1999 explain how to use such API.



来源:https://stackoverflow.com/questions/7282079/address-windowing-extension

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!