minecraft-ram-allocation-guide
ALRIGHT YOU PLEBS, LETS LEARN HOW TO ALLOCATE RAM TO MINECRAFT!!!
I will be using the example of a fabric installation of minecraft below, choose the installation that is corresponding to the one you are using.
1. Click on Installations
It's near the top of the launcher.
2. Find your installation and click on the three dots.
Remember, to your corresponding installation.
Afterwards, click on edit.
3. After getting into a settings screen, click on more options at the bottom to see fancy Java stuff.
4. On JVM arguments, change only that number between Xmx and G.
In my case I’ve changed it to 8 for 8 gigabytes. If it’s not G, it’s probably M or m for megabytes, you can change it to G, don’t touch anything else.
5. Click on Save.
Extra Notes
If you're part of the server I'm on, I recommend at least 6GBs of RAM. Now technically it can run with 4GB, but unless you wanna play on a slideshow, AT LEAST 6GBs.