Overclock.net banner

1 - 20 of 101 Posts

·
Registered
Joined
·
1,674 Posts
Discussion Starter #1
I know that XP is limited to something like 2.75GB of RAM. Can someone please explain, as detailed, yet simply(that makes no sense, I know) as possible, why this occurs?

Someone is arguing with me that Windows utilizes however much RAM your mobo supports, and I know that he is completely wrong(he's talking about x32).

I really need to just beat him down with this, cause I don't really like him. So anyone who can explain this well, please step up to the plate.
 

·
Registered
Joined
·
1,674 Posts
Discussion Starter #4
Okay. From what I've found:

32-bit systems support a total of 4gb of RAM. Windows takes this and splits it in half, using 2gb for apps, and 2gb for the kernel. If you add the /3g switch the boot.ini, then it uses 1gb for the kernel, and 3gb for apps.

My questions: What does Windows do when I only have one gig of RAM? I don't see it split in half anywhere.

Also, doesn't this render that extra 1gb of RAM useless? I mean if the kernel runs fine when I only have 1gb total, why does it need to steal 1gb to itself?
 

·
Premium Member
Joined
·
8,427 Posts
Quote:

Originally Posted by amped
Yep, any idea why 3gb is the limit?
Especially since I thought it was 4GB
 

·
Premium Member
Joined
·
13,422 Posts
On my system I use about 450Mb with AIM, FAH, Avast, Desktop Utilities, Microsoft AntiSpyware, RivaTuner, and a ton of FireFox broswers. When I play games (BF2) it goes up to about 1200, so 2GB is great for games. I can't imagine anyone needing more than 2 GB though.
 

·
Registered
Joined
·
404 Posts
This is from a post I made in another topic a long time ago. Windows XP Pro supports up to 4 Gigs of RAM. I've included a link below (MSA555223) that gives a really good breakdown of what Windows does with your memory.

Origonal Message from Topic 66772 post #8

Quote:
Heh, just make sure you don't go building a windows system with that much ram. The only MS Windows that can handle 32GB or more is Windows 2000 Datacenter Server, Windows Server 2003 Enterprise Edition, and Windows Server 2003 Datacenter Edition.

Quote:
Here's a list of how much RAM the various Windows versions and editions support (as of Nov 2004):

Windows NT 4.0: 4 GB
Windows 2000 Professional: 4 GB
Windows 2000 Standard Server: 4 GB
Windows 2000 Advanced Server: 8GB
Windows 2000 Datacenter Server: 32GB
Windows XP Professional: 4 GB
Windows Server 2003 Web Edition: 2 GB
Windows Server 2003 Standard Edition: 4 GB
Windows Server 2003 Enterprise Edition: 32 GB
Windows Server 2003 Datacenter Edition: 64 GB
(Windows XP 64 bit supports upto 128 GB ram)

Microsoft Article 555223

Xaine99
 

·
Registered
Joined
·
2,823 Posts
4gb is common place in the design industry, i think you can go a bit more. But 64bit doesn't really ahvea limit atm as im aware of, or it might be 1tb i read a while back. But nothing to be concerned with lol
 

·
Registered
Joined
·
2,823 Posts
i woudlnt mind 4 gig lol.

PLus 2gb gave my firends dad problems so went for 4gig instead lol.

He runs auto cad at 1600x1200 over 2 21" TFT's lol

And he had a 64bit 4000+ summer last year lol.
 

·
Registered
Joined
·
1 Posts
Not sure if anyone is still interested but here it goes, all 32 bit CPU's internal architecture only allow them to access 4Gb of ram,because your CPU only works with 1's and 0's (binary) so 32 bit is a maximum of 32 1's or 0's next to each other so there is a physical constraint since the addresses are limited. So the 64 bit CPU has twice as many bits to use for memory allocations. But this is just on the CPU side Motherboard specs, and Operating systems also have to be taken into account, btw 32 bit CPU's have supported 4Gb of ram all the way since the 80386, it was only as a result of the Motherboards and OS's that there was a limit on the amount of RAM (and the trivial fact that you couldn't get anyone, apart from a few propeller heads, who knew how big 4Gb was let alone get that amount of Ram, but why would you, in those days I didn't know how on earth I would EVER be able to fill up my brand new 100Mb hard drive)
 

·
Premium Member
Joined
·
3,031 Posts
Quote:

Originally Posted by Cmespeak View Post
Not sure if anyone is still interested but here it goes, all 32 bit CPU's internal architecture only allow them to access 4Gb of ram,because your CPU only works with 1's and 0's (binary) so 32 bit is a maximum of 32 1's or 0's next to each other so there is a physical constraint since the addresses are limited. So the 64 bit CPU has twice as many bits to use for memory allocations. But this is just on the CPU side Motherboard specs, and Operating systems also have to be taken into account, btw 32 bit CPU's have supported 4Gb of ram all the way since the 80386, it was only as a result of the Motherboards and OS's that there was a limit on the amount of RAM (and the trivial fact that you couldn't get anyone, apart from a few propeller heads, who knew how big 4Gb was let alone get that amount of Ram, but why would you, in those days I didn't know how on earth I would EVER be able to fill up my brand new 100Mb hard drive)
Great first post... rep+ for your first post, i wish everyones first post was like this LOL
 

·
Banned
Joined
·
3,467 Posts
Quote:

Originally Posted by Cmespeak View Post
Not sure if anyone is still interested but here it goes, all 32 bit CPU's internal architecture only allow them to access 4Gb of ram,because your CPU only works with 1's and 0's (binary) so 32 bit is a maximum of 32 1's or 0's next to each other so there is a physical constraint since the addresses are limited. So the 64 bit CPU has twice as many bits to use for memory allocations. But this is just on the CPU side Motherboard specs, and Operating systems also have to be taken into account, btw 32 bit CPU's have supported 4Gb of ram all the way since the 80386, it was only as a result of the Motherboards and OS's that there was a limit on the amount of RAM (and the trivial fact that you couldn't get anyone, apart from a few propeller heads, who knew how big 4Gb was let alone get that amount of Ram, but why would you, in those days I didn't know how on earth I would EVER be able to fill up my brand new 100Mb hard drive)
Welcome to the forum nice to have you here.

You are wrong.

Let me start with the obvious. 2^64 is not twice as much as 2^32? It is maybe beyond an order of a magnitude? 4GB is 2^32 and is 4GB of addressable memory 2^64 is 17.2 billion GB. More than RAM must use so you will never get 4GB's of RAM with a 32bit OS. Consider?

And as I said welcome.
 

·
Registered
Joined
·
24 Posts
To end all the speculation about a Windows XP Professional supporting more than 4 GB of physical RAM
I patched the kernel. For the test I used the kernel file ntkrpamp.exe from XP SP1, which is the multi
processor kernel with enabled physical address extension. Pay attention that we can not use XP SP2 or
SP3, because Microsoft removed the RAM support since SP2.

The fastest method to find the RAM patch location inside an unknown kernel executable is by setting a
breakpoint at the function ExVerifySuite with the following WinDbg command:
bp nt!ExVerifySuite

We run the OS and after the breakpoint is hit press Shift + F11 to step out of the function ExVerifySuite.
Right at this code location has to be a check for the suite type and some typical RAM size values like:
- 0x80000 for 2GB RAM
- 0x100000 for 4GB RAM
- 0x200000 for 8GB RAM
- 0x400000 for 16GB RAM
- 0x800000 for 32GB RAM
- 0x1000000 for 64GB RAM
- 0x2000000 for 128GB RAM
We only have to patch the jumps accordingly, so the biggest possible value is used.

For XP SP1 we patch the following offset in ntkrpamp.exe which enables all available RAM up to 64 GB:
- WinDbg "bp nt!MiPagesInLoaderBlock+0x48" from
80684d66 7515 jne nt!MiPagesInLoaderBlock+0x5f (80684d7d)
to
80684d66 90 nop
80684d67 90 nop
- IDA from
INIT:005B0D66 jnz short loc_5B0D7D
to
INIT:005B0D66 nop
INIT:005B0D67 nop
- hex editor offset 0x197D66 in the kernel file ntkrpamp.exe from
75 15
to
90 90

After ntkrpamp.exe is changed we have to do the following to replace the original kernel file:
- correct the checksum of ntkrpamp.exe with LordPE
- add /PAE switch to boot.ini
Do not omit this step otherwise we can not address the full RAM!
- replace the original kernel file by the patched one:
- rename the file "C:\Windows\Driver Cache\i386\driver.cab" to "driver.cab_"
- rename the file "C:\Windows\Driver Cache\i386\sp1.cab" to "sp1.cab_"
- rename the file "C:\Windows\system32\ntkrnlpa.exe" to "ntkrnlpa.exe_"
- cancel the "Windows File Protection" message box and choose "Yes"
- copy the patched file ntkrpamp.exe to "C:\Windows\system32\ntkrnlpa.exe"
- cancel the "Windows File Protection" message box and choose "Yes"
- reboot
 

·
Registered
Joined
·
828 Posts
Thanks Kondra, very interesting stuff
thumb.gif
.

So if I follow you we basically need to get the XP SP1 ntkrpamp.exe kernel, modify it 'removing the limiter', then rename as ntkrnlpa.exe and paste in place of original ntkrnlpa.exe kernel (plus extra touches).

When you say:
Quote:
... Pay attention that we can not use XP SP2 or SP3, because Microsoft removed the RAM support since SP2 ...
You mean that only the XP SP1's ntkrpamp.exe kernel is suitable for modification, or you mean that this procedure will not work at all for XP SP3?
 

·
Registered
Joined
·
24 Posts
It would also be possible to modify the SP2 and SP3 ntkrpamp.exe, but it would have no effect at all. It seems Microsoft has changed some stuff like the HAL starting with SP2.

You can find a very good explanation of all the stuff here:
http://www.geoffchappell.com/notes/windows/license/memory.htm
http://www.unawave.de/windows-7-tipps/32-bit-ram-sperre.html
http://support.microsoft.com/kb/888137
Quote:
To reduce driver compatibility issues, Windows Vista and Windows XP Service Pack 2 or a later version include hardware abstraction layer (HAL) changes that mimic the 32-bit HAL DMA behavior. The modified HAL grants unlimited map registers when the computer is running in PAE mode. Additionally, the kernel memory manager ignores any physical address that is more than 4 GB. Any system RAM that is more than the 4 GB barrier would be made unaddressable by Windows and be unusable in the system. By limiting the address space to 4 GB, devices with 32-bit DMA bus master capability will not see a transaction with an address that is more than the 4 GB barrier. Because these changes remove the need to double-buffer the transactions, they avoid a class of bugs in some drivers that is related to the correct implementation of double buffering support.
 

·
Registered
Joined
·
828 Posts
Quote:
Originally Posted by kondra View Post

It would also be possible to modify the SP2 and SP3 ntkrpamp.exe, but it would have no effect at all. It seems Microsoft has changed some stuff like the HAL starting with SP2.

You can find a very good explanation of all the stuff here:
http://www.geoffchappell.com/notes/windows/license/memory.htm
http://www.unawave.de/windows-7-tipps/32-bit-ram-sperre.html
http://support.microsoft.com/kb/888137
Yeah I read the sites you link long ago and know about the HAL 'problem' in XP SP3, that's why I asked for clarification, thanks Kondra.

Removing the limiter in Vista & Se7en is piece of cake, but XP SP3 is tougher.

From the comments to this article seems they managed some success by transplanting halmacpi.dll from XP SP1:

Quote:
Originally Posted by daNIL
Hi quay,

Are you sure you're using the correct hal.dll? There are many versions of them, to detect the correct one you need to open your original hal.dll in explorer (rightclick-properties) and look for the original name.

In the Version tab, look for the original file name property. For example, on my PC it's halmacpi.dll. So, you need to extract halmacpi.dll from XP SP1 distributive to system32 folder, and modify/add the boot.ini menu to include it like this

multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows XP Professional patched halsp1″ /pae /fastdetect /kernel=ntkrnlp2.exe /hal=halmacpi.dll

Not sure which hal.dll you're using, but it works ok on my pc, usb drives and DMA are working.

Do not try Server 2003 SP2 halls, as they are not binary-compatible with XP (different set of imported/exported functions)
Quote:
Originally Posted by ouay
whooooooaaaa it works now!
I've never seen so fast windows in my life! (Since old days of XP SP1 maybe).

Awesome. Thank you for your support! WD!
 
1 - 20 of 101 Posts
Top