Allocating more memory to minecraft?

When i try to allocate RAM to my minecraft i keep getting errors. I've done it right multiple times but i keep getting java errors. What code do i put in to the java arguments area to allocate 8gb of memory to minecraft?

It is -Xmx8192M -Xms8192M

Remember it uses it as MB so you have to convert the GB to MB. There are 1024 MB in a GB.

Also make sure you have enough RAM in your computer, a computer with 8gb RAM won't work as RAM is already being used, so for 8gb dedicated to minecraft you will need at least 16gb.

Maybe you should try using the method with Task Manager, All you have to do is simply open the Task Manager up (Ctrl+Alt+Del) and on the programs list find Minecraft, Right click it and select go to process and it will be highlighted in the process list. Then simply right click the java process that is highlighted and hover over "Set Priority" and click on "High" or "Real Time" and click okay. All done!

Hope this helps!