Before you allocate RAM there are some things you should know:
x64 systems can allocate up to 192GB when using Windows Professional or above. 16GB when using Windows Home Premium and 8GB when using Home Premium and Starter. Also, please be aware of the physical limits imposed by your CPU Architecture.
x32 systems can allocate up to 1GB (This is from personal experience on a 8GB machine and a 3GB machine, please correct me if I'm wrong)
So it is recommended you have a x64 system to allocate as much RAM as possible. Try an leave at least 1GB for the general system processes and stuff like that.
Here is how you allocate RAM on a windows system:
Create a new document and save it as run.bat
type the following this is for 4GB:
"c:\location to your javaw" -Xmx4096M -Xms2048M -jar "location.to.your.minecraft.exe"
So basically, the xmx is your maximum RAM your allocating and your xms is the minimum ram it should use.
Here is an example of an actual run.bat:
"C:\Program Files\java\bin\javaw.exe" -Xmx4096 -Xms2048 -jar "C:\users\user\Desktop\minecraft.exe"
Or if you have assigned Java in your system variables
javaw -Xmx4096 -Xms2048 -jar "C:\users\user\Desktop\minecraft.exe"
Obviously don't just copy my code, as you need to find out where A) Your javaw.exe is located and B) where your minecraft.exe
Remember: 1GB = 1024MB and 0.5GB = 512MB