Stella
Game mods

How to allocate more RAM to Minecraft and stop out of memory crashes

A modpack's memory raised from 2 GB to 6 GB, every other launcher setting kept.

Download StellaFree with the plan you already have.

A real run on 13 November 2026, on a Linux computer, using Claude Code with Opus, on a Claude plan. The waiting is sped up; it took 1 min 27 s in real time.

The short answer.

In the official Minecraft Launcher, go to Installations, hover the modpack, click the three dots, Edit, More Options, and change -Xmx2G in JVM Arguments to -Xmx6G. In CurseForge, use Settings, Minecraft, Java Settings, Allocated Memory. 6 to 8 GB suits most modpacks; never give it more than half your computer's memory. Stella (stella.sh) reads the crash log to confirm memory is the cause, then raises it to a safe amount.

Stella does this on Windows, Mac and Linux.

What happened.

The modpack's profile raised from 2 GB to 6 GB in about 1 minute 30 seconds. Checked afterwards against an answer key written before the run, at file level: launcher_profiles.json is still valid, the modpack profile has exactly one -Xmx, at 6 GB, with its original G1 flags kept, and the other profiles and launcher settings are unchanged.

Checked in the files only. The test computer has a realistic launcher folder with a 20-mod pack, a crash report and an out-of-memory log, but no copy of the game, so Minecraft wasn't launched to confirm the crash is gone. The work is sped up 2×.

How Stella does it.

  1. Finds the launcher that runs the modpack and reads the crash report: the pack hit its 2 GB cap while loading the world
  2. Checks how much memory the computer has (about 62 GB on the test computer) and how big the pack is (20 mods) before choosing a number
  3. Changes -Xmx2G to -Xmx6G on the modpack's profile only, keeping its other Java flags and every other profile as they were
  4. Backs up the launcher settings first, so the change is easy to undo
  5. Doesn't start the game, and tells you to keep the launcher closed until you play, because it can overwrite the change when it closes

The prompt.

Minecraft keeps crashing with an out of memory error when I play my modpack. Can you give it more RAM?

Paste it into Stella and press Enter.

This is the exact prompt from the recording. If your files are somewhere else, say where.

Do it yourself.

  1. Make sure it's really memory

    Open the newest file in the pack's crash-reports folder, or logs/latest.log, and search for OutOfMemoryError or “Java heap space”. If the crash names a mod or a missing dependency instead, more RAM won't help.

  2. Official launcher: edit the JVM arguments

    Open the Minecraft Launcher, choose Installations, hover over the modpack's installation, click the three dots, Edit, then More Options. In JVM Arguments, change the number in -Xmx2G to -Xmx6G, leave the rest of the line alone, and click Save.

  3. CurseForge, Prism and other launchers

    In the CurseForge app, go to Settings, Minecraft, Java Settings and move the Allocated Memory slider; it applies to all its modpacks. Prism Launcher and the Modrinth app set memory per instance in that instance's settings.

  4. Pick a sensible amount

    About 4 GB is plenty for unmodded play and 6 to 8 GB for most modpacks; go higher only for very large packs. Leave at least half your computer's memory for everything else: on an 8 GB laptop, 4 GB is the ceiling. Far too much can cause longer stutters.

  5. Test it

    Start the modpack and load the world that crashed. Press F3: the Mem line shows the new maximum. If it still crashes with memory to spare, a mod is probably leaking memory; check that mod's issue tracker.

Where it stops.

  • Checked in the files only: the test computer had no copy of Minecraft, so the game wasn't launched and the fix wasn't play-tested.
  • More RAM only fixes out-of-memory crashes. Stella read the crash log first for that reason; a crash from a broken or mismatched mod needs a different fix.
  • It edits the official launcher's settings file, which the launcher can overwrite if it's open at the time. Close it before asking.
  • Recorded on Linux, where the game folder is ~/.minecraft. On Windows it's %APPDATA%\.minecraft and on a Mac ~/Library/Application Support/minecraft; other launchers keep their own settings, which this run didn't cover.
  • The crash log and launcher settings go to the AI model you use in Stella while it reads them.

Questions.

How much RAM should I give Minecraft?

About 2 to 4 GB for unmodded play, 6 to 8 GB for most modpacks, and never more than half your computer's memory. Past that point more isn't better: it can make the game pause for longer.

Why does it still run out of memory after I added RAM?

Either the change didn't stick (the launcher was open and overwrote it), it went on a different installation, or a mod is leaking memory. The F3 screen's Mem line tells you whether the new limit is in effect.

Do I need 64-bit Java?

Only if you set a custom Java path: 32-bit Java can't use more than about 1.5 GB. The official launcher's bundled Java is 64-bit, so most players never need to think about it.

What if the modpack crashes with exit code 1 instead?

Then it's usually a missing or mismatched mod, not memory. See modpack crashing with exit code 1. Textures not loading is a different fix: install a resource pack.

Is Stella free for this?

Yes. Free with the ChatGPT or Claude plan you already have. Sign in with your ChatGPT plan, or use your Claude plan through Claude Code, and this task costs nothing extra. New accounts also get a small free trial of Stella’s own models.

Can I control what Stella changes on my computer?

Yes. Stella works on Windows, Mac and Linux with your own files and shows each step in the chat, so you can watch it and stop it at any point. Tell it what it may not do, as the prompts on these pages do (“don't delete anything without asking”). In the Downloads recording it deleted nothing until it was told to go ahead. It also refuses commands that would wipe a whole disk, your home folder or system folders.

Checked against these sources on 13 November 2026.

Stella