overrides%appdata%/.minecraft/Edit profile and add a JVM Arguments: as the folowing that your Computer support
-Xmx6G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn1024M
-Xms6G to your device aviable memmory size.-Xmn1024M is a bit over kill but you can change it to -Xmn128M as standard