Jump to content
Sign in to follow this  
Lee Bussy

Detect PAE Mode?

Recommended Posts

Lee Bussy

I have a need to detect if I am currently running under PAE mode. I did some Googles and came up rather empty. Any ideas?

Share this post

Link to post
Share on other sites

Afaik PAE is always disabled (when 'enabled' it still uses 4 KB pages) on 32-bit Windows due to driver instabilities and high risks of BSOD. On 64-bit systems it's enabled by default.

Anyway, the wiki article states you can identify PAE mode through the CPUID PAE flag; EAX=1: Processor Info and Feature Bits and it's bit 6. Seems you can only do this through assembler and that's beyond me. There are good examples though when you do a forum-search for CPUID.

[center]Spiderskank Spiderskank[/center]GetOpt Parse command line options UDF | AU3Text Program internationalization UDF | Identicon visual hash UDF

Share this post

Link to post
Share on other sites

Actually, PAE is probably always enabled on a 32 bit system and is unnecessary on a 64 bit system.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post

Link to post
Share on other sites

Yea or that way around. From what I've understood PAE mode on 32-bit makes no difference to the way Windows behaves under the hood. And on 64-bit it's unnecessary or redundant as 64-bit always has enough bit space.

I found the articles I found rather vague and contradicting. I didn't spend too much time reading them thoroughly though :>

[center]Spiderskank Spiderskank[/center]GetOpt Parse command line options UDF | AU3Text Program internationalization UDF | Identicon visual hash UDF

Share this post

Link to post
Share on other sites

I work with OpenSimulator which is a Virtual World Simulator software... (It can be a game but it's a whole lot more). The code is written in C# -Net Framework and is cross platform from Windows to Linux/Mac with MONO. Memory usage is always a problem as the server can use up a lot of system resources and it's not uncommon to hit the RAM Limits of 32-Bit operating systems. In fact, I am using AutoIT to write a GUI front end manager application to manage the operations, functions, installs, upgrades etc of the server software.

I believe what you may be seeking more information on is LAA or Large Address Aware, which allows a 32bit Application to use up to 3GB of ram on a 32-bit Windows or 4GB of Ram on a 64-bit Windows. I wrote up a quick doc for OpenSimulator & Aurora-Sim on how to patch for the executable's to enable LAA.

I'll include a txt doc here on patching for LAA. This "may" be of assistance in helping you find what you are looking for. There is reference links which might be helpful... This Doc is below:

FYI if someone is pondering Forum Rules: OpenSimulator is NOT a game. It is an Immersive Virtual World environment with simulations. For more information feel free to look here @ http://opensimulator.org/wiki/Main_Page

Some Helpful extra info on PAE / LAA:

There is a registry key you could test against, I believe this varies between Versions but here is a link:


Also checking against the boot.ini which is also dependent on Win Version but more info @


Hope it Helps, Good Luck


---- Inserted Test Doc ----

Patching OpenSim.exe & OpenSim.32BitLaunch.exe to allow them to access more RAM in Windows Systems.


An application running in 32Bit Mode on Windows can only access access 2GB Ram Total by default. As seen with OpenSim, this

can can easily be reached when you throw in enough prims, scripts & users. The Solution is to patch the EXE to make it aware

and to adjust 32-Bit windows to accomodate that (x64 is already capable).

When a 32-bit application is Large Address Aware, it can access up to 4GB on x64 operating systems and up to 3GB on x86.

64-bit Windows, require no modifications to the operating system to benefit from the Patched EXE files.

32-bit Windows, require some adjustments and they vary according to Version of Windows.

Linux/Mono do not appear affected by Large Address Aware patched exe's *** Still needs thorough verification. ***

How-To Patch EXE

Method 1)

If you have Visual Studio 2008/2010 and/or C++ Express

COPY your OpenSim.exe / OpenSim.32BitLaunch.exe to a safe place (backup)

Copy again to a separate Working Directory (the ones you will patch)

Open a Command Prompt (CMD) and change directory to that working dir

run Following Command: OpenSim.32BitLaunch.exe



Method 2) (maybe simpler and does not require C++ be installed)


Above has an APPLICATION in the first posting which makes patching your executables easy.

See Thread in the link for details.

Windows Mods Required (not applicable to 64bit)





Ensure you have View All Files & System Files enabled.

In the root of C:\ you will see a file named "boot.ini" MAKE A BACKUP COPY OF IT somewhere safe !

Edit it with NotePad (you must be admin priviledged) and ADD the /3GB switch as shown below

It will look similar to this example:

[boot loader]



[operating systems]

multi(0)disk(0)rdisk(0)partition(2)\WINNT="????" /3GB

Where: "????" in the example can be the programmatic name of the operating system versions shown below:

Windows XP Professional / Windows Server 2003 / Windows Server 2003 Enterprise Edition / Windows Server 2003 Datacenter Edition.

REFERENCE: http://www.microsoft.com/whdc/system/platform/server/pae/paemem.mspx


Vista uses BCDedit. A powerful yet potentially Very dangerous tool !

Open a Command Prompt (CMD)

Make a New Directory to preserve a BACKUP of the System Store & change dir there.

Example: md c:\BCDbackup then cd c:\BCDbackup


run the follow command IN BCDbackup: bcdedit /export MyFileName

Where MyFileName is something simple like MyBCD


run the following command: BCDEDIT /Set INCREASEUSERVA 3072

NOTE: That is the Maximum assuming you have that much RAM and don't even try to make it more, the result would be not pleasant.


The following command imports the data from C:\Data\BCD Backup into the system store:

bcdedit /import "c:\BCDbackup\MyBCD"



WIN-7+ (Nothing Required, support is already there and better implemented)



By Patching the EXE files, they will use up to 4GB Ram on 64Bit or 3GB on 32bit. This will not force

the system and won't cause harm if the the system does not have the RAM.

Modifying Win-XP & Vista (especially Vista) is a risk you have to measure for yourself. These are well documented

and known to work as you can see with the provided reference info.

Effects on Linux / Mono: None have been noted by anyone using patched EXE files as Linux Handles memory differently

but it is still subject to specific 32Bit limitations for 32Bit flavours.




http://support.microsoft.com/default.aspx?scid=889654 (shows mem capabilities & page sizing)


~ WhiteStar Magic

Always tuned to http://www.superbluesradio.com/  Tune in at

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this