nicelight_memoryfix
Reduces memory buildup and potential leaks in large Forge 1.20.1 modpacks through automatic heap-pressure cleanup, targeted cache clearing, unload hooks, and diagnostic tools.
截图
介绍
Nicelight Memory Fix Deep
Low-overhead memory-leak mitigation and deep cache-management utility tailored for heavy modpacks and marathon sessions.
Overview
In large modpacks with extensive exploration, high-intensity combat, and continuous dimension-hopping, retained object references gradually accumulate over time. Nicelight Memory Fix Deep prevents progressive performance degradation and out-of-memory crashes by actively severing orphaned references that standard Java Garbage Collection (GC) cannot reclaim on its own.
Compatibility
Engineered to run seamlessly alongside the modern Forge optimization ecosystem with zero mixin conflicts:
- Fully Compatible: ModernFix, FerriteCore, Embeddium / Rubidium, ServerCore, Noisium, Oculus, and Smooth Boot.
- Combat Animation Safe: Zero desync or null pointer issues when paired with Epic Fight or heavy combat animation frameworks.
Core Architectural Features
1. Upstream Vanilla Bug Fixes
- MC-101260 Fix: Clears player raycast crosshair pointers on world unload, allowing discarded worlds to be safely reclaimed by the garbage collector.
- MC-260605 Fix: Cleans dead mob
Brainmemory references immediately upon entity removal. - LevelRenderer Patch: Flushes the
destroyingBlocksmap upon leaving a dimension, preventing cross-dimension texture retention leaks. - SoundEngine Patch: Drains the
instanceToChannelmap on sound termination, stopping OpenAL audio handle exhaustion. - MapRenderer Patch: Evicts stale held-map textures from client heap space when closed.
- Biome Temperature Cache: Purges thread-local temperature caches during routine cleanups.
2. ThreadLocal Leak Mitigation
- Scans background worker threads (Forge, Netty, Minecraft) via an internal JVM
Unsafeaccessor to detach retained world and classloader references without requiring--add-opensJVM startup flags.
3. Crash-Free Brain AI Cleanup (Epic Fight Compatible)
- Modifies expired mob memory targets to
Optional.empty()instead of stripping map keys entirely. This effectively severs memory links from dead mobs while preserving 100% crash-free stability with Epic Fight and third-party entity AI routines.
4. World & Chunk Ticket Eviction
- Purges stale
DistanceManagertickets, unloads abandoned POISectionStorage, and flushes cached 3DStructureTemplateNBT payloads from memory.
5. Audio & Native VRAM Maintenance
- Terminates looping ghost sound channels and reclaims orphaned OpenAL audio buffers back to the operating system.
- Trims native direct-memory allocations inside
BufferBuilder.
6. Non-Intrusive Heap Pressure Automation
- Monitors heap consumption across three dynamic thresholds: 50% (Soft), 70% (Light), and 82% (Strong).
- Sweeps execute asynchronously in single-digit milliseconds without triggering stop-the-world
System.gc()pauses during active gameplay.
Commands Reference (/nm or /nmem)
| Command | Description |
|---|---|
/nm stats (or /nm) |
Displays real-time used heap, committed memory, watchdog world status, and active mixin counters. |
/nm sweep |
[Full Deep Clean] Triggers an exhaustive purge across all 16+ cache tiers (audio, textures, tickets, thread locals, brain states) and outputs a diagnostic breakdown. |
/nm scan |
Runs a non-destructive diagnostic scan to inspect objects currently retained on background worker threads. |
/nm gc |
Executes targeted cache cleanups followed by a single manual JVM garbage collection cycle. |
/nm pressure |
Evaluates current heap pressure against configured thresholds and executes the corresponding mitigation tier. |
/nm watchdog |
Checks whether any unloaded dimensions or worlds remain retained in memory. |
/nm config |
Prints an overview of active runtime configuration values. |
/nm discover |
Scans loaded mod JARs to identify newly registered cache classes. |
Configuration
All memory thresholds, sweep intervals, and subsystem hooks can be configured in:
config/nicelight_memoryfix_deep.json
常见问题
nicelight_memoryfix 支持哪些 Minecraft 版本?
nicelight_memoryfix 支持 Minecraft Java 版 1.20–1.20.1,共 2 个版本,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。
nicelight_memoryfix 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
Player_7777 的其他作品
查看全部 →nicelight_async_loader
"Fixes exploration lag spikes and freezes caused by massive structures! Pre-loads chunks ahead for butter-smooth Elytra flight, speeds up world loading, and prevents void chunks. Great standalone or supercharges C2ME in heavy modpacks."
Epic Fight NiceLight Craft
"True combat. Total survival. Experience a hardcore RPG world powered by Epic Fight
评论
登录后评论和评分