Open the Minecraft Launcher
Go to Installations
Select the profile you want to edit
Click More Options
Find the JVM Arguments field
Locate the memory value in the `-Xmx` setting
Change the number to the amount of RAM you want to allocate
Save the profile
Launch Minecraft
Example JVM argument: `-Xmx4G`
Use `-Xmx2G` for 2 GB
Use `-Xmx4G` for 4 GB
Use `-Xmx6G` for 6 GB
Use `-Xmx8G` for 8 GB
Do not allocate all of your system RAM
Keep enough memory for your operating system and other programs
