NOTE: so far this is only for XP, I am not aware of how to do this in vista as it has boot.ini, ignore the vista options.
I spent a while typing this. I'm going off of memory.
I am not responsible if you kill your computer while doing this.
Note: in MANY versions of windows it will be limited to 8GB or so NO MATTER WHAT YOU DO.
This is perhaps one of the most asked questions about windows operating systems: "Why does my computer only use about 3GB of ram when I have 4[or more] put in?" Well part of it is video memory allocation, part of it is hidden so windows will be guaranteed to have enough memory to maintain it's stable condition, and there are many other reasons I'm not going to tell you. So, how do you make it use 4 or more GB of ram?
With the Physical Address Extension (PAE) boot.ini switch.
WAIT, WHAT?
I won't go into detail besides the fact that it allows you to use more RAM.
To use this you must enable Data Execution Prevention (DEP), in XP go to control panel>system>advanced>under performance press settings

go to the DEP tab, and select the lower option.
In vista do the same but after system, look on the left panel for advanced system settings, and click it.
OK that's the safest part of this 2-part operation.
Be very, very, very careful when doing the next part. Do as I say and as I do.
Now you need to add /PAE to boot.ini. It's easy but slightly dangerous (windows is usually fixable even if you **** this up). In XP open my computer, in vista, computer. From here select your main drive(usually called C: ).
In vista click organize
in XP click view then folder options
then click folder and search options

in XP click folder options
select the view tab

look for 'Hide protected operating system files', uncheck it ignore the warning, it's really not any more dangerous with this off.

Go to your main drive again. Look at all the files and folders in the main drive for BOOT.ini (maybe just called BOOT)
right click it, uncheck read-only. press ok.
double click BOOT.ini and at the very end of it add "/MAXMEM=8192 /PAE" so instead of
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOW S
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Micro soft Windows XP Pro"
it looks like
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOW S
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Micro soft Windows XP Pro" /MAXMEM=8192 /PAE
Save, reboot, profit. I have not tested this but I've heard it works. And it makes sense.
Thanks for reading this, it only took me 57 minutes to write now I'm just a little more

than before.