A couple of things. First you updated the 32bit version of Java and not the x64 version. That and the launcher is preferring the older x64 version of Java. Uninstall all versions of Java and restart your computer. Then install only the
x64 version of 7u51. Then restart again. Now you are allocating the maximum amount of memory your computer has and not leaving any for windows or other background programs. Leave
at least 1GB for those. So your max allocation should be about 3GB. To be safe you might want to go as little as 2GB, especially if this is a laptop or has integrated video. The video card can and will use RAM if it is integrated.