King's Domain Logo

King'sDomain INFO

How to Fix Minecraft Exit Code -805306369 (Out of Memory)

10 min read

You're deep in the mines, carrying a full inventory of diamonds, or maybe you're finally placing the last block on your mega-base. Suddenly, the screen freezes. The sound loops. The game crashes to the desktop, and you are greeted by the cryptic Exit Code: -805306369.

This is one of the most frustrating errors in Minecraft because it often happens after playing for a while, just when you are most immersed. Unlike generic crashes, this error code tells a very specific story: Your Minecraft client has completely run out of memory (RAM).

In this technical guide, the King's Domain team will walk you through exactly why this happens, how the Java Virtual Machine (JVM) handles memory, and the definitive steps to fix it for good in 2025. Whether you are playing Vanilla, a heavy Modpack, or connecting to one of our high-performance servers, this guide is your roadmap to stability.

Understanding Exit Code -805306369

To fix the problem, you must first understand the mechanism behind it. Minecraft runs on Java. When you launch the game, you aren't just starting a game executable; you are spinning up a Java Virtual Machine (JVM) instance. This JVM reserves a specific amount of your computer's RAM, known as the Heap Space.

As you play, Minecraft fills this Heap Space with data: loaded chunks, entity positions, textures, and mod data. Periodically, a process called Garbage Collection (GC) runs to sweep away data that is no longer needed (like chunks you've walked away from), freeing up space for new data.

Exit Code -805306369 occurs when the Garbage Collector fails. It tries to free up space, but the game is demanding more memory than is available in the reserve. The JVM panics and terminates the process to prevent your entire operating system from crashing. In technical terms, it is an OutOfMemoryError.

Why does this happen now?

Even if your computer has 32GB of RAM, Minecraft might crash because it only has access to what you explicitly allocated to it. By default, many launchers only allocate 2GB (2048MB). While this was sufficient for Minecraft 1.12, modern versions like 1.20+ and 1.21+ are significantly more resource-intensive.

Solution 1: Allocating More RAM (The Golden Rule)

The most direct fix is to increase the amount of RAM the JVM is allowed to use. However, there is a "Goldilocks Zone" here.

  • Too Little: You crash with Exit Code -805306369.
  • Too Much: If you allocate 100% of your system RAM, your Operating System (Windows/macOS) will starve, causing system-wide lag. Furthermore, allocating too much RAM to Java can actually cause lag spikes because the Garbage Collector has too much "trash" to sift through, resulting in freezes every few seconds.

Recommendation: If you have 16GB of system RAM, allocate 4GB to 6GB for Vanilla, or 6GB to 8GB for heavy modpacks. Never allocate more than half your system's total memory.

How to Allocate RAM in the Default Minecraft Launcher

  1. Open the Minecraft Launcher.
  2. Click on the Installations tab at the top.
  3. Hover over the version you want to play (e.g., "Latest Release") and click the three dots (...) on the right, then select Edit.
  4. Click More Options to expand the advanced settings.
  5. Look for the field labeled JVM Arguments. You will see a string of text starting with something like -Xmx2G.
  6. Change the number in -Xmx2G to your desired amount. For example, change it to -Xmx4G for 4 Gigabytes, or -Xmx6G for 6 Gigabytes.
  7. Click Save and launch the game.

How to Allocate RAM in CurseForge

If you are playing modpacks, you are likely using CurseForge. The default settings here are notoriously low for modern packs.

  1. Open the CurseForge App.
  2. Click the Settings gear icon in the bottom left corner.
  3. Under the "Game Specific" section, select Minecraft.
  4. Scroll down to Java Settings.
  5. You will see a slider under "Allocated Memory". Drag this slider to your desired amount (e.g., 4096MB for 4GB, or 6144MB for 6GB).
  6. Close settings and launch your modpack.

How to Allocate RAM in Prism Launcher / MultiMC

Prism Launcher (a fork of MultiMC) is highly recommended by the King's Domain team for its superior instance management.

  1. Right-click your Minecraft instance and select Edit Instance.
  2. Go to the Settings tab on the left sidebar.
  3. Check the box for Memory.
  4. Adjust the "Maximum memory allocation" field. For example, set it to 4096 MiB or 6144 MiB.
  5. Close and launch.

Solution 2: Verify Your Java Installation (32-bit vs 64-bit)

This is a common pitfall for users on older hardware or those who have migrated installations across computers.

The Issue: If you have a 32-bit version of Java installed, you cannot allocate more than roughly 1.5GB of RAM, regardless of how much memory your physical computer has. If you try to set -Xmx4G on a 32-bit Java version, the game will simply refuse to launch or crash immediately.

The Fix: Ensure you are running a 64-bit version of Java.

  • On Windows, open a command prompt (CMD) and type java -version. If it doesn't explicitly say "64-Bit Server VM", you might be on 32-bit.
  • Modern Minecraft (1.17+) requires Java 17 or Java 21. These are almost exclusively 64-bit. We recommend downloading the Microsoft OpenJDK or Adoptium Temurin builds.
  • In your Launcher settings, ensure the "Java Path" is pointing to your 64-bit installation (usually in Program Files, NOT Program Files (x86)).

Solution 3: In-Game Video Settings

Allocating more RAM increases the supply, but you must also decrease the demand. Certain video settings consume disproportionate amounts of memory.

Render Distance vs. Simulation Distance

Render Distance controls how many chunks are visible. Simulation Distance controls how many chunks are actively ticking (processing entity AI, crop growth, redstone).

High Render Distance (32+ chunks) is the number one cause of Exit Code -805306369. Each visible chunk stores geometry data in RAM.

  • Action: Lower your Render Distance to 12-16 chunks.
  • Action: Lower your Simulation Distance to 10 or fewer. This significantly reduces the memory overhead for entity calculations.

Solution 4: Optimization Mods (The Secret Weapon)

If you play Vanilla Minecraft, you are missing out on massive performance gains. The community has developed mods that optimize the way Minecraft stores data in memory, often reducing RAM usage by 40-50%.

"Running Minecraft without performance mods is like driving a sports car with the handbrake on."

Essential Mods for Fabric/Quilt Users:

  • Sodium: Replaces the rendering engine. drastically improves FPS and reduces VRAM usage.
  • Lithium: Optimizes game physics and chunk loading logic (Server & Client side).
  • FerriteCore: This is the most important one for this specific error. It reduces the memory usage of block states and item models.
  • ModernFix: Fixes various bugs and inefficiencies in modern Minecraft versions that cause memory leaks.

Essential Mods for Forge/NeoForge Users:

  • Embeddium: A port of Sodium for Forge.
  • FerriteCore: Also available for Forge. Highly recommended.
  • Radon: A port of Lithium for Forge.

Solution 5: Offloading to a Server

If your computer simply lacks the RAM to run the game and the internal server simultaneously (remember, single-player is just a client connected to a local server), the best solution is to offload the heavy lifting.

When you play on a dedicated server, your computer only needs to handle graphics and input. The server handles chunk generation, entity AI, and physics. This drastically lowers the RAM requirement for your client.

King's Domain offers high-performance servers running on top-tier hardware (Ryzen 9 processors, DDR5 RAM). By hosting your world with us, you can enjoy complex modpacks or high render distances without your personal computer crashing with Exit Code -805306369. Our infrastructure is built to handle the heavy memory loads that desktop PCs struggle with.

Advanced: Custom JVM Arguments

For power users, you can fine-tune the Garbage Collector (GC) to be more efficient. The default GC is good, but the G1GC (Garbage First Garbage Collector) is generally preferred for Minecraft.

Here is a widely tested, stable set of JVM arguments for 2025 (Minecraft 1.18+):

-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1

How to use: Paste these arguments into the "JVM Arguments" field in your launcher (as described in Solution 1), after your -Xmx and -Xms flags. These arguments help the GC run smoother, reducing the "stuttering" lag that often precedes a memory crash.

Conclusion

Exit Code -805306369 is a clear signal that your Minecraft client is gasping for air (RAM). By correctly identifying whether you need to allocate more memory, fix a memory leak with mods, or simply lower your render distance, you can permanently solve this issue.

Remember, the goal is stability. Start by allocating 4-6GB of RAM. If that fails, install FerriteCore and Sodium/Embeddium. And if you want to play with friends without burdening your own hardware, consider moving your world to a King's Domain server, where we handle the memory management for you.

Stop Crashing, Start Playing

Offload your world to a King's Domain server and let our enterprise RAM handle the load.

View Server Plans