1. Open the Java version of your Minecraft client.
2. At the top of the launcher, you will see the installations tab there, select it.
3. Place your cursor on the profile or Minecraft version that you want to work on. After this, you will see three dots by the top right of your window; click on it
4. There would be a drop-down menu from which you will select the "edit" option. There would appear a modal, and you will also see "more options" at the bottom left side, one which you are going to select.
5. Locate the JVM arguments field. After you have located this field, you should see a code written there, like -Xmx1G. The simple clue lies here. Just change the figure 1 to any number higher than 1. This would be the number of RAM that would be allocated to your Minecraft.
6. The next simple step to take is to locate a green button that has "Save" written on it. Click on the button, and you are done.