Myth: In order to use AWE, you must enable PAE


Address Windowing Extensions (AWE) does not require PAE. I don't know why some people claim that it does, since it is so easy to demonstrate otherwise.

Take a program that uses AWE. If you don't have one handy, you can use the one that comes in MSDN as a sample program that demonstrates how to use AWE. Grant yourself "Lock Pages in Memory" privileges and run the program. Observe that it works.

Now remove the /PAE switch from your boot.ini, reboot, and run the program again. Observe that it still works.

Myth disproved by direct experimentation and observation.

Comments (15)
  1. Paul Wilson says:

    Its amazing how many people spend more time researching what others say instead of just testing things for themselves. :)

  2. Chris Walker says:

    Sidney Marshall of Dartmouth Timesharing (DTSS) fame used to say "Computers is an experimental science".

  3. Miles Archer says:

    Caveat: I don’t know anything about PAE and AWE. And I believe you when you say that they are it’s not required.

    However, proving that one test case works does not prove that it works for the general case or that there are subtle problems that will occur over time.

  4. Well, it is documented that AWE does require PAE. "Without PAE, AWE cannot reserve memory in excess of 4 GB." [1]

    So, I wouldn’t call it a myth.

    [1] http://support.microsoft.com/?kbid=283037

  5. Raymond Chen says:

    It doesn’t say that AWE requires PAE. It says that AWE requires PAE in order to allocate more than 4GB of physical memory. But that’s just stating the obvious. You need PAE in order to access more than 4GB of physical memory, AWE or no AWE.

  6. Greg Page says:

    I wrote that article, so yeah, it should agree with exactly with what Raymon says. If it doesn’t let me know, and it will be fixed post haste. and I blame any inaccuracies on editors who change things I write after the fact.

  7. And is there a valid use for AWE without PAE?

  8. Greg Page says:

    The same uses as with it, I would imagine.

    And one of the most benficial things is, developers can test AWE apps without having to enable PAE.

  9. Raymond Chen says:

    One use is if you want to allocate non-swappable memory.

  10. Can’t it use PSE to access beyond 4GB using 4M pages above that area? I thought PSE was meant for that, but didn’t succeed because the 4M pages were not as usable as Intel had hoped. The top few bits were in the bottom of the address part that wasn’t used in the 4M page entries.

  11. RJ says:

    I think giving these functions a fancy name (AWE) leads to confusion. I’ve used VirtualAllocEx several times to inject code into other processes. Never knew it was part of AWE.

  12. Raymond Chen says:

    Please take another look at the documentation. VirtualAllocEx is AWE only if you pass the MEM_PHYSICAL flag.

  13. Raymond Chen says:

    True, you can’t use an experiment to prove that something will always happen, but you can use it to disprove that something *never* happens or *requires* something else.

  14.   As Evan already mentioned on his blog, Raymond Chen has a great series on /3GB switch on his blog. What is really cool is that Raymond takes on some myths about the /3GB switch and  the fact that he…

Comments are closed.