You can get a command block in your Minecraft Java or Bedrock world using cheats and a special chat command.
To reallocate RAM to "Minecraft," you'll have to edit the game's settings through whatever launcher app you use.