HomeJavaModsMemGuard
MemGuard
ModsJava

MemGuard

by SeishiroNagi · on Modrinth

Reduces RAM usage in large modpacks and servers by caching NBT strings, monitoring memory usage, and triggering garbage collection at optimal times.

⬇ Download on Modrinth

MemGuard

Lean memory behavior for long Minecraft sessions.

MemGuard is a lightweight utility mod for Fabric / Forge / NeoForge (Minecraft 1.21.1) focused on reducing avoidable allocations and making memory pressure easier to observe.

What MemGuard does

1. Reuses repeated short NBT strings

2. Logs periodic heap snapshots

3. Tracks texture-atlas lifecycle (client)

Technical notes

Important accuracy notes

Reproducible evaluation (recommended)

To evaluate MemGuard for your own setup, compare baseline vs. MemGuard under identical conditions:

  1. Same Java version, JVM args, mod list, world seed, and config.
  2. Same runtime window (recommended: 30-60 minutes per run).
  3. At least 3 baseline runs + 3 MemGuard runs.
  4. Collect comparable metrics:
  1. Compare distributions (median/p95), not single spikes.

Installation

Fabric

  1. Install Fabric Loader (0.16+)
  2. Install Fabric API
  3. Place MemGuard jar in mods/

Forge / NeoForge

  1. Install the matching loader for your Minecraft version
  2. Place MemGuard jar in mods/

Compatibility

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more