Board Thread:Bug Reports/@comment-176.128.202.147-20160810160057/@comment-27219153-20160810215750

You added the -Xmx6G but you didn't remove the -Xmx512M. Minecraft still thinks you only have 512Mb allocated. Simply remove the -Xmx512M tag and you should be fine, assuming your only problem is not enough memory :)