You can install Minecraft Forge for free from the Forge website, and then use it to download and enable mods.
To reallocate RAM to "Minecraft," you'll have to edit the game's settings through whatever launcher app you use.