How to allocate more memory for Minecraft:
Because many people ask this question here's a little tutorial how to give Minecraft more RAM memory to work.
Why should I allocate more memory?:
Normaly Minecraft works fine with his 1GB RAM. But if you allocatte more memory, you can better some situations:
More RAM for texture pack buffering (128x ++)
More RAM for singleplayer and multiplayer maps buffering (less reloading)
Better working with RAM intensive mods
Faster map rebuild
This tutorial requires that you've installed a full Java version, (Java SE) or Java Developement Kit (JDK, includes SE) on your system. Else it might not work right. Installing the right Java version (also important: 32/64 bit) often solves many problems.
"Minecraft runs out of memory" happens often while running it with the wrong Java version! The preinstalled Java on new Computers-Systems might not support this. If you don't have installed Java, get it here!
What do I have to do:
Since Minecraft version 1.6.X you can use the new launcher. With this, it is possible to integrate Java commands directly into the game. Here is what you have to do:
Download and execute the new launcher
In the section "Profile Selection" click on "Edit Profile"
Under "Java Settings (Advanced), activate "JVM Arguments" and add into the text area this argument:
Save this profile and execute Minecraft. You will always start with 2GB of RAM
Need more ram? You can adapt the number to your needings (see RAM Versions)
Picture depending on the launcher version. It may look little different with a newer launcher
Attention: This does not work with the new Minecraft Launcher, see above.
Go to the same folder where you downloaded and execute minecraft.exe (the launcher, not the jar file!)
Create a new textfile in this folder
In the textfile, you should write the following line:
java -Xmx2048M -Xms2048M -jar "Minecraft.exe"
java -Xmx4096M -Xms4096M -jar "Minecraft.exe"
Notice: If you use an older Java version or 32bit, Java might not support more RAM than 4GB. This depends on your system. Be sure to use the right and newest Java version (64bit on 64bit-systems is recommended). (thanks to everyone in this topic who told me this hint)
4. Save the file with a name you wish, but it is important that you save it as .bat (You need to see the endings of files to edit this correctly!). For example Minecraft 2GB RAM.bat
Notice: If you don't save the batchfile in the same folder where Minecraft.exe is, you have to type the whole path instead of the "Minecraft.exe"!
5. Now run your batch file (not the normal launcher) and minecraft starts with more memory. Finally, enjoy
Which numbers can I insert?:
You can adapt the numbers to your needings:
-Xmx is the maximum of RAM wich Minecraft can allocate.
-Xms is the allocated RAM at the beginning.
-Xms must not be greater than -Xmx!
Java 32bit only supports up to 4GB. The limit depends on the system, if you got an error, try less allocation.
Be sure to use the right and newest Java version (64bit on 64bit-systems is recommended).
1GB total allocated
and so on ...
You can also shorten:
Notice: You can't give Minecraft more Ram than you have! Else you will recieve an Error!
How much space can I allocate?:
At least not more than you've installed in your system.
To see how much RAM is free, open the Task Manager and change to the Performance Tab. Look how much Physical Memory is available / free.
Note that other programs and your system also need RAM to work:
Some numbers for example:
Windows Vista Home Basic: 512 MB RAM
Windows Vista Home Premium, Business, Enterprise, Ultimate: 1GB RAM
Windows 7: 1 GB RAM (32-Bit) or 2 GB RAM (64-Bit)
Windows 8 / 8.1: 1 GB RAM (32-Bit) or 2 GB RAM (64-Bit)
Linux: 1-2 GB
Skype: 256 MB
Teamspeak: 64 MB
Something doesn't work? Possible solutions: First of all check your batch file on spelling mistakes. This is one of the most frequently faults.
Then be sure you've installed a full Java version! Pre-installed versions might not support more memory.
Error "Could not create Java virtual machine":
Remove -Xms[RAM] and try again
Adjust the numbers, try both at the same level
Check if you've enough free RAM. Do you use 64bit (when greater than 4GB)?
Possible Solutions for old launcher:
CMD closes so fast, I can't read what's wrong:
Throw in pause on a new line (thanks to Syfaro for the hint)
System has a problem with the java:
Do you have installed Java SDK and the right version? (32/64bit on 32/64bit systems)
Doesn't seem to work for me. Here's exactly what I put: java -Xmx2048M -Xms2048M -jar "C:\Users\^^^^^\Desktop\Minecraft.exe" (erased my name) I do have the required RAM, but it just flickers the cmd screen, then nothing happens. Sorry if I'm missing something totally obvious, bit of a noob with this kind of stuff.
The difficult thing is: before cmd closes, he writes his problem, but then it closes a bit too fast .
If we knew what cmd wants to tell us, it would be easier to help. The only think I could tell now is the same like Animal: Be sure the path is spelled right and you have the Minecraft.exe file on your deskop (not a minecraft.ink link).
Try to look if you can capture a picture or something of the cmd. If you find "Error: Unable to acess jarfile Minecraft.exe" then the problem is that cmd doesn't find the file.