Memory and GC Setup ‐ Mojang Launcher - Vivecraft/VivecraftMod GitHub Wiki
To set the memory and garbage collector settings in the Mojang/Vanilla launcher, follow these steps:
- Go to the "Installations" tab
- Click the ellipsis (...) on the desired installation, then click "Edit"
- Click "MORE OPTIONS" at the bottom of the settings
- Add
-Xmx6G -Xms6G -XX:+UseZGC
to the JVM arguments - Click "Save"
If you'd like to allocate more or less memory, change both of the 6s in the JVM arguments to the desired value in GB. A minimum of 6 GB is recommended for ZGC. If your game crashes immediately, check that you aren't combining the new arguments with conflicting ones. It's recommended to just replace any existing arguments unless you know exactly what you're doing.