For win32 users - a script that allows actual usage of 4GB+ of RAM....

GenTarkin

Limp Gawd
Joined
Aug 14, 2005
Messages
436
For years Ive wanted to find a way to use PAE to allow windows 32bit to actually use 4GB+ RAM...since thats basically what PAE is really for. On modern machines windows nearly always has PAE turned on because DEP(nx bit) requires PAE be used. So, by default most windows 32bit installs actually use the PAE enabled kernel.
But, even when PAE is forced on or is on because of DEP... RAM above 4GB is still locked away and unusable.
After coming across this article: http://www.geoffchappell.com/notes/windows/license/memory.htm

Ive been inspired to get this working for myself. So, Ive successfully been able to patch vista_32 & win7_32 kernels, resign them and boot from them. This has been tested on a couple different machines and works fantastic.
After confirming both kernel types are patchable, I set out to write an autoit script that automates the process on both vista & 7.
So, Ive made my first release of the patch. It basically patches the kernel, creates a cert, signs the patched kernel w/ the cert, modifies BCD to add entry of picking between original kernel & patched copy of the kernel.
NOTE: this is ONLY for vista or 7. Win8 32 I have not tested. XP this patch is not possible.
TO INSTALL: Simply run the exe

TO UNINSTALL: by creating a shortcut to my script, and putting 'uninstall' (without quotes) as an argument, it will remove the BCD entries and delete the modified kernel.

I am posting links to my script, one is the precompiled version(the executable)
The other is the source so you can see for urself what it does.
https://dl.dropbox.com/u/1791919/Kernel4GBpatcher.exe
https://dl.dropbox.com/u/1791919/Kernel4GBpatcher.au3
Screenshot:
https://dl.dropbox.com/u/1791919/5GB_32bitWin7.PNG

-
NOTE: after applying the patch, your system may show "test" mode water mark on the desktop in the corner(s). This is normal. There are guides to get rid of this watermark(by editing user32.dll.mui file). I may make it as part of my script in the future if there is enough demand for it.

Donations: 12jjayHWtUci3ygPXD4i2yUHMySytiUBd4
 
Last edited:
neat, but probably a better idea to simply get out of the stone age and just install 64 bit.

license keys work across both, what's the point?

edit: cool certificate name: Bitcoin Forever
 
I agree. Going 64-bit is probably the best way to go for Vista & 7.

On the other hand, great work. There will be some that will appreciate your work greatly but such people are starting to move towards 64-bit as well.
 
Looks like the script extracts some binaries into a temp directory and then automates some button pushing. Did you put the patcher together too? That's the binary I would be most interested in seeing the source of....

windows.vista.x86.kernel.patch-patch.exe
 
PAE is hard coded in HOME 32 bit OSes to disable more than 4GB of memory. The only 32 bit OSes you could enable more than 4GB of memory on was Server grade. That's why forcing it doesn't do squat. Also running PAE mode without certified drivers for it can cause some serious issues.

I hate PAE threads.

In the past 2 years I've moved everything over to 64 bit. For the occasional App that doesn't officially support 64 bit or run under 64 bit, I call whoever is trying to sell it to me, tell them off, and find something else. I've no patience for companies who are stuck in the past.
 
Last edited:
PAE is hard coded in HOME 32 bit OSes to be disabled. The only 32 bit OSes you could enable it on was Server grade. That's why forcing it doesn't do squat. Also running PAE mode without certified drivers for it can cause some serious issues.

I hate PAE threads.

In the past 2 years I've moved everything over to 64 bit. For the occasional App that doesn't officially support 64 bit or run under 64 bit, I call whoever is trying to sell it to me, tell them off, and find something else. I've no patience for companies who are stuck in the past.

You are completely and utterly wrong. As I stated in my OP and the article which supports what Im saying. PAE is turned on BY DEFAULT on nearly every desktop OS, because DEP REQUIRES PAE be enabled. But, while PAE is used, the RAM addressable above 4GB is still locked out as per a kernel flag setting, and that flag is changed in the server OS's to allow PAE addressable RAM.
2ndly ALL the issues w/ drivers are corrected if the 64bit counterparts of drivers are written correctly(nearly EVERY driver today for 64bit is). If the drivers were buggy in PAE mode they would exhibit the same bugs in 64bit. In other words, driver writers would have to work HARDER to make their 32bit drivers not work correctly PAE. The problem mainly lies in drivers that dont support 64bit PTE's .. which are used in 32bit PAE. Well, 64bit drivers naturally use 64bit PTE's, it would make no sense to lose that 64bit PTE capability when recompiling for 32bit OS.

The real reason for drivers possibly not liking 32bit PAE, was because back when 64bit OS was new and 64bit drivers were buggy as hell, those same exact bugs were in the 32bit drivers, when PAE was turned on...

So, on both accounts u are incorrect and my claims are backed in that article. That article is the most thorough read done on PAE and debunks a lot of shit myths about it.
 
So, on both accounts u are incorrect and my claims are backed in that article. That article is the most thorough read done on PAE and debunks a lot of shit myths about it.

Because everything you read on the internet is true. :rolleyes:

That article has been around forever, and it would be a bit more believable if Geoff didn't make it sound like an evil conspiracy on Microsoft's part. Using PAE does introduce issues, that's why Microsoft allows you to use your license key for both the 32 and 64-bit version of whatever variation of Vista/7/8 you're using. PAE is a workaround that Microsoft tested and eventually decided not support on home versions of their software because of legitimate problems with stability. It also pushed OEMs to migrate to 64-bit, which is good for everyone.

What's the point of running 32-bit anymore? All you lose by going to 64-bit is 16-bit support, and you can always use DOSbox or a 32-bit Windows VM to run those old applications.
 
Last edited:
What's the point of running 32-bit anymore? All you lose by going to 64-bit is 16-bit support, and you can always use DOSbox or a 32-bit Windows VM to run those old applications.


What do you mean "all you lose"??? You make it sound like a small thing that I can't play Chimp's Challenge or SkiFree natively on my box anymore!!! :mad:
 
Because everything you read on the internet is true. :rolleyes:

That article has been around forever, and it would be a bit more believable if Geoff didn't make it sound like an evil conspiracy on Microsoft's part. Using PAE does introduce issues, that's why Microsoft allows you to use your license key for both the 32 and 64-bit version of whatever variation of Vista/7/8 you're using. PAE is a workaround that Microsoft tested and eventually decided not support on home versions of their software because of legitimate problems with stability. It also pushed OEMs to migrate to 64-bit, which is good for everyone.

What's the point of running 32-bit anymore? All you lose by going to 64-bit is 16-bit support, and you can always use DOSbox or a 32-bit Windows VM to run those old applications.

This is the most knowledgable article Ive found, the others that paint PAE w/ a bad story are just people regurjitating the same shit that really know nothing on the matter. Geoff is the only one who actually stated a way to get it to work and Ive indeed replicated his results w/ no issues on both vista & 7. So, yes, Ill take his word / methods / findings over all the other non proven articles out there, including your statements. Like I said, MS disabled it because at the time 64bit drivers were buggy as hell and that translated into drivers that were buggy when fully using PAE's potential. Now that that isnt an issue nowadays, nearly every 32bit driver fully supports PAE because their 64bit counterparts are written correctly.
I can see why MS decided to turn this feature of PAE off...they needed at least 1 version of their OS to be stable(32bit non PAE) .. while their 64bit stuff had their teething issues figured out(driver writers). MS refused to have both of their 32bit & 64bit versions be affected by crappy written drivers.

Also, that article has not been around "FOREVER" .. just came out in 2009, which is when windows 7 came out...that was not forever ago. By then most people encouraged 64bit anyhow so I imagine this discovery was swept under the carpet for the most part.
Now, if something this awesome came out lets say in ... 2006ish, there would have been a lot more demand for a patch like this.
The myths of PAE being problematic on of itself .. have been around for a lot longer than that article.
 
GenTarkin, what is your reasoning for utilizing 32-bit rather than 64-bit? Is this just a helpful tool you wanted to provide people?
 
This is the most knowledgable article Ive found, the others that paint PAE w/ a bad story are just people regurjitating the same shit that really know nothing on the matter. Geoff is the only one who actually stated a way to get it to work and Ive indeed replicated his results w/ no issues on both vista & 7. So, yes, Ill take his word / methods / findings over all the other non proven articles out there, including your statements.

How do you know he's 'knowledgeable' if his article is the only thing you're basing your opinion on? He's certainly not the only person to explain how you can enable PAE, I know I've read about it before.

PAE is disabled by default in common Linux distros, too, and for the same reasons. Compatibility issues and a small (generally 5% or less) decrease in performance. Your machine doesn't have problems using PAE, good for you, I ran Windows ME for years and never had a problem either.

Again, why bother with 32-bit when you can just go 64-bit?
 
How do you know he's 'knowledgeable' if his article is the only thing you're basing your opinion on? He's certainly not the only person to explain how you can enable PAE, I know I've read about it before.

PAE is disabled by default in common Linux distros, too, and for the same reasons. Compatibility issues and a small (generally 5% or less) decrease in performance. Your machine doesn't have problems using PAE, good for you, I ran Windows ME for years and never had a problem either.

Again, why bother with 32-bit when you can just go 64-bit?

You people dont get it do you, Windows ENABLES PAE by default on almost any 32bit install. Because DEP REQUIRES it, and therefore it chooses the PAE enabled kernel. The kernel flag for disabling RAM above 4GB is still set though. This has been the case even since XP.
Look, appreciate the work Ive done to make this auto scripted kernel patch, using your current kernel and not someones prepatched kernel...or DONT.
Im tired of everyone complaining & whining .. about how its a bad thing and that it wont work...when clearly it does.
 
how much testing have you actually done on the patched kernels?
why would anybody want to deploy it, when it's so much easier, less of a hassle, and less chance of incompatibility issues by just going x64?

National Instruments software fails to run with PAE enabled, because it's not designed to support PAE on the x86 platform.
http://digital.ni.com/public.nsf/allkb/8355753BD0C8E62F8625768C005B359B

32 bit I/O devices (and driver code) will most likely not understand addresses above 4 GB.

This creates a "hole", as some of the address space is set aside for these drivers (see Memory Map (x86)). You may be able to remap DRAM from this region to a space above 4 GB, or the storage may be lost.

There is additional complexity with DMA (how can your 32 bit hard disk driver copy code or data for a process located above 4 GB?).

These difficulties often drive OS developers to work in a flat 64 bit address space.
http://wiki.osdev.org/Physical_Address_Extension

Yup, but of these are because of improper coding :rolleyes:

Also, most 32-bit drivers are not PAE-aware, and hence will crash if they get loaded above the 4gb memory limit. This is not an issue with Windows Server drivers, but Microsoft requires those to be PAE-aware; hence no issues.
 
Correct, but manufacturers who write drivers for 64bit .. already have all the working mechanisms in place in their 64bit versions when compiling for 32bit .. to enable correctly functioning w/ 32bit PAE....
It would be MORE WORK for them to strip the PAE ability inhereted from their 64bit builds when compiling for 32bit.
In otherwords, any driver today that has a correctly functioning 64bit version, MOST LIKELY has 32bit PAE version working properly as well, unless the driver writers wanted to throw time / money at disabling those inhereted 64bit functionality that makes them work properly for 32bit PAE......
 
Looks like the script extracts some binaries into a temp directory and then automates some button pushing. Did you put the patcher together too? That's the binary I would be most interested in seeing the source of....

windows.vista.x86.kernel.patch-patch.exe

I have done a little looking into the program you mentioned( as of the OP I didnt, but now have since you made me wonder as well). Turns out that installer utilizes dup2 patch creator for windows binaries. I found the source dup2 patch file that makes the changes. I verified those changes against the offsets / opcodes stated in article I linked.
Just to be absolutely safe I recreated the patcher, put some of my own branding on it and updated its title to reflect 7 patching as well. I have updated the script in the links provided in OP.
http://diablo2oo2.di.funpic.de/dup.html is the patch creator program
here is the link to my freshly created dup2 patch file, which you can inspect exactly what it does for yourself:
https://dl.dropbox.com/u/1791919/nrkrnlpa.dUP2
 
neat, but probably a better idea to simply get out of the stone age and just install 64 bit.

license keys work across both, what's the point?
What about if your running a 32-bit CPU?

Maybe your 32-bit OS does everything you want but you would like the full 4GB of RAM to use, plus those softwares that you paid for and are tied to the OS you installed them on would have to be dealt with if changing from 32-bit to 64-bit.

It's very much a niche segment for people staying with 32-bit for now, so if you're happily running a 64-bit OS then GenTarkin's patch should be of next to no interest.

Also, most 32-bit drivers are not PAE-aware, and hence will crash if they get loaded above the 4gb memory limit.
Most 32-bit drivers work with virtual memory and use the Windows API's for mapping physical memory if needed, so no problem for them with physical memory being used above 4GB. There may be a few drivers that do naughty things (BSOD) but then there are 64-bit drivers that BSOD aswell. Should we stop using 64-bit because of this, of course not. If you run into driver problems with the patch then you can make the decision to stop using the driver or the patch, everyone has their own preference.

BTW PAE is used in 64-bit mode aswell.

GenTarkin, in case you did not know there have been patches published before. Just be wary of Windows updates to the kernel which happen from time to time. Vista 32-bit had a kernel update in Jan 2013 IIRC.

AFAIK W8 RT (which is 32-bit only) also is limited to 4GB RAM even though it's a different architecture (ARM) and unlike the 32-bit x86 processors which are limited to 64GiB of physical addressing through PAE, the cortex ARM processors are providing LPAE which allows up to 1TiB of physical addressing. Idk the reason for the limitation as it's all a bit new. Not suggesting any patching, just mentioning it out of interest.
 
Oh, here we go again

PAE is not something you want to mess with if you have drivers that can't handle LBA (Creative Labs, anyone?)

Also your CHIPSET has support memory >4GB and IO remapping and in the consumer segment, Santa Rosa was the first chipset that supported those features for the Intel side of things (I believe AMD was first due to long history of memory controller intergration into the CPU it's self). This will result in the PCI IO Map being at the TOP of the memory stack...
 
You are completely and utterly wrong. As I stated in my OP and the article which supports what Im saying. PAE is turned on BY DEFAULT on nearly every desktop OS, because DEP REQUIRES PAE be enabled. But, while PAE is used, the RAM addressable above 4GB is still locked out as per a kernel flag setting, and that flag is changed in the server OS's to allow PAE addressable RAM.
2ndly ALL the issues w/ drivers are corrected if the 64bit counterparts of drivers are written correctly(nearly EVERY driver today for 64bit is). If the drivers were buggy in PAE mode they would exhibit the same bugs in 64bit. In other words, driver writers would have to work HARDER to make their 32bit drivers not work correctly PAE. The problem mainly lies in drivers that dont support 64bit PTE's .. which are used in 32bit PAE. Well, 64bit drivers naturally use 64bit PTE's, it would make no sense to lose that 64bit PTE capability when recompiling for 32bit OS.

The real reason for drivers possibly not liking 32bit PAE, was because back when 64bit OS was new and 64bit drivers were buggy as hell, those same exact bugs were in the 32bit drivers, when PAE was turned on...

So, on both accounts u are incorrect and my claims are backed in that article. That article is the most thorough read done on PAE and debunks a lot of shit myths about it.
Calm down. I misspoke on a minor part, and it was obvious I was talking specifically about using more than 4GB of ram, so no I wasn't 'completely wrong'.

Using more than 4GB of ram on 32 bit OS is a decade+ old issue so who gives a fuck anymore and why waste time worrying about it when you can just run 64 bit OS.
 
Last edited:
I doubt many people are using 4 GB+ RAM with a CPU that old.

Your right and IMO most of those would be content with using less than 4GB, then there would be a much smaller group of those looking to utilize the full 4GB not 4GB+. As already stated, it's only for a few special cases (niche segment).

There are still a lot of LGA775's out there. Some can not afford the latest HW or upgrading components and rely on hand downs so have to make do with what they have. ;)

And yes, it's also specific with chipset support, for instance the 945 chipset is limited to 32-bit physical addressing while 946 chipset is 36-bit.
 
There are still a lot of LGA775's out there. Some can not afford the latest HW or upgrading components and rely on hand downs so have to make do with what they have. ;)

As long as they aren't running a really old Celeron then they'll be able to use 64bit instructions. :p
 
It's a decent hack for cases where you have over 4GB of memory installed on a 32-bit desktop version of Windows. The OS can use the additional memory size for applications and caching.

It doesn't really help with other things. An individual application will still have memory size limitations (typically 2GB per 32-bit process under 32-bit Windows*), but it is possible for some apps to use AWE to address more memory. Virtually no commercial or open source 32-bit apps for Windows desktop OSs use AWE.

I agree with the complaints above. If you need a large memory size, and especially to work around 32-bit process size limitation, just go to 64-bit Windows.

* 32-bit process is limited to 4GB under 64-bit Windows.

As long as they aren't running a really old Celeron then they'll be able to use 64bit instructions. :p
Rock that Northwood/64-bit disabled Prescott. And don't forget 64-bit disabled Atoms. AMD even made some Semprons with 64-bit disabled. :D
 
Hi, Gen Tarkin!

I have old Win 7 desktop that I'd like to try your auto-patch on.
Valid d/l link?

Regards,
j
 
Back
Top