Out of memoryjava.lang.OutOfMemoryError: Failed to allocate bytes (Off-Heap Rendering Memory)
What the log looks like
java\.lang\.OutOfMemoryError: Failed to allocate \d+ bytes
Failed to allocate \d+ bytes[\s\S]{0,250}(?:GlAllocationUtils\.allocateByteBuffer|class_311\.method_1596)
How to fix it
- Update Iris Shaders, Sodium, and visual entity mods (such as Illuminations) to the latest builds available for your Minecraft version, as older releases (especially Iris 1.1.0 and 1.1.1) contained severe native memory leaks during chunk and shadow compilation.
- Lower your launcher's RAM allocation (-Xmx) to 4 GB–6 GB instead of raising it; giving too much RAM to Java starves OpenGL and LWJGL of the remaining system memory needed for off-heap rendering buffers.
- Check Windows Virtual Memory (Paging File) settings and ensure it is set to 'System managed size' rather than disabled or manually restricted, as disabling the pagefile causes native buffer allocations to fail abruptly.
- Reduce Render Distance and Max Shadow Distance in Video Settings (or test with shaders toggled off) to cut down off-heap mesh buffer consumption, and close RAM-heavy background applications like browsers.
| Loaders | Fabric, Quilt, Forge, Neoforge, Vanilla |
|---|
| Severity | Stops the game |
|---|
| Category | Out of memory |
|---|
Check your own log