promotional bannermobile promotional banner

MemGuard

Reduces RAM usage in large modpacks and servers by deduplicating NBT strings and monitoring memory usage, without forced GC freezes.
SeishiroNagi | MemGuard
Create a server, get 25% off your first monthaffiliate logo
Create Server
affiliate banner image

MemGuard

Lightweight memory helper for modded Minecraft.
Deduplicates repeated NBT strings and keeps an eye on your heap — without ever freezing your game.

Minecraft 1.20.x Minecraft 1.21.x Forge NeoForge Fabric


🆕 Forge v1.0.5 — no more lag spikes

Older Forge builds (1.0.3 and earlier) forced a full garbage collection every 5 minutes and after every texture atlas upload. In big modpacks that meant a short freeze every few minutes. Version 1.0.5 removes every forced GC: tested in a 364-mod pack, the 609 ms freeze every 5 minutes is gone. If you use MemGuard on Forge, please update.

What MemGuard Does

Feature Description
NBT String Dedup Short, repeated NBT strings (item ids, keys, enum names) share one instance instead of being stored thousands of times. Lock-free and size-limited, so it never slows other threads down.
Memory Monitor Writes a short memory status to the log and warns when heap usage gets risky, so you know when a pack needs more RAM or a lower view distance.
No Forced GC MemGuard never calls System.gc(). The JVM's own garbage collector already runs at the right moments.

MemGuard is a helper, not a miracle: it does not promise specific FPS, MSPT or RAM numbers. For memory leaks, pair it with mods like AllTheLeaks or FerriteCore.

Supported Versions

Loader Minecraft Java Latest build
Forge 1.20 – 1.20.6 17+ v1.0.5
NeoForge 1.21.x 21+ v1.0.4
Fabric 1.21.x 21+ v1.0.1 (update with the same fix coming soon)

Check the Files tab for the exact build per version.

Compatibility Notes

  • Works alongside FerriteCore and AllTheLeaks.
  • Safe to run with -XX:+DisableExplicitGC (common in server packs).
  • If logs mention missing Create classes, check that Create and its addons are on the same update line (Update 5 with Update 5 addons, Update 6 with Update 6 addons). That is not caused by MemGuard.

Quick Install

  1. Install the loader for your Minecraft version.
  2. Put the MemGuard jar for your loader in the mods folder.
  3. Start the game and look for [MemGuard] lines in latest.log.

Support the Project

If MemGuard helps your pack, consider leaving a tip — it keeps the coffee ☕ flowing and the fixes coming!

Buy me a coffee on Ko-fi

Found a problem? Leave a comment with your latest.log — every report helps. 💙

MemGuard Team

profile avatar
  • 3
    Followers
  • 16
    Projects
  • 443.6K
    Downloads
Donate

More from SeishiroNagiView all

  • EMI Collections project image

    EMI Collections

    Folders for your EMI favorites: named, coloured collections, drag & drop, amount goals and item notes.

    • 42
    • October 6, 2026
  • Stack Processing project image

    Stack Processing

    Fast smelting for furnaces and tech machines: process the whole stack in the time of one item, paying fair fuel or energy. Works with Mekanism, Ender IO, IE and Iron Furnaces.

    • 72
    • September 29, 2026
  • SwiftTool project image

    SwiftTool

    Automatically switches to the best tool in your hotbar the instant you start mining a block, and switches back when you're done.

    • 6
    • September 22, 2026
  • Lost Input Fix project image

    Lost Input Fix

    Fixes lost or dropped mouse and keyboard input at low FPS in Minecraft

    • 630
    • August 26, 2026
  • EMI Collections project image

    EMI Collections

    Folders for your EMI favorites: named, coloured collections, drag & drop, amount goals and item notes.

    • 42
    • October 6, 2026
  • Stack Processing project image

    Stack Processing

    Fast smelting for furnaces and tech machines: process the whole stack in the time of one item, paying fair fuel or energy. Works with Mekanism, Ender IO, IE and Iron Furnaces.

    • 72
    • September 29, 2026
  • SwiftTool project image

    SwiftTool

    Automatically switches to the best tool in your hotbar the instant you start mining a block, and switches back when you're done.

    • 6
    • September 22, 2026
  • Lost Input Fix project image

    Lost Input Fix

    Fixes lost or dropped mouse and keyboard input at low FPS in Minecraft

    • 630
    • August 26, 2026