If you want to use above 1.5 gb ram in Minecraft. You have to make sure you have 64 bit version of Java. If you cant go above 1.5gb ram, it means you are most likely using 32bit version of java. To use 64 bit java, you need to have a 64 bit version of your OS installed (Windows)
Atleast 4gb ram is recommended for Minecraft modpacks. Some packs require a lot more.
First lets remove the one you currently have installed.
1: Go to Apps and Functions in Windows, and find Java.
Click on “Remove” and follow the instructions to remove it.
2: Now restart your computer.
3: Now go to: https://www.java.com/en/download/manual.jsp
4: You should now see the following:
Select “Windows Offline (64-bit) and download it.
5: Now double click the downloaded file, and follow the instructions to install java.
6: Restart your computer.
You should now have 64 bit java installed.
You can double check this by going to the start menu/click on windows key on your keyboard.
Write cmd, and open the commandprompt.
Now write the following: java -version
And hit enter, it should now tell you if you have 64 bit installed.
You should now be able to go above 1.5 gb ram in Minecraft.
_____________________
You can also just go back to Apps And Functions (The place where you removed Java at), and the name will be 64-bit or 32-bit.