Are you sure you have 64 bit java installed? If not, you can follow these instructions to fix that. Please note, this all assumes that you are running a Windows Operating System.
Step 1: Go to your search bar and search "Control Panel" assume that anything I tell you to search is without quotes.
Step 2: Once you get the control panel pulled up, look for a "Programs" tab and click "Uninstall a program"
Step 3: Once you get into the Uninstall tab, got to the search bar and search "Java" it should pull up whichever version of Java you have, click on that install and click "Uninstall"
Step 4: After the uninstall is complete, go to this link and download the 64bit version:
http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html Don't worry, it's a link to the official java page.
Step 5: Run the install for 64 bit Java, just follow the instructions it gives you.
Step 6: It should work now, go into Minecraft and attempt to allocate the ram as you did before and attempt to run Minecraft.
This should solve your problems, if it doesn't just post and I'll try to help you again.
I hope this was easy enough to understand, I don't know what kind of skill level you are at with computers.
Edit: You may have the problem that the user above me described. You can check this by going to your "Control Panel" and click on System and Security. After that click on System, it should tell you what type of Operating System you have.