Contains executable files or external scripts. Ensure you trust the creator and apply your own security measures.
Overview
Native GC Patcher is a high-performance memory management plugin for Virt-A-Mate (VaM). It interacts directly with the game's Mono runtime to control Garbage Collection (GC), eliminating micro-stutters caused by frequent GC spikes and preventing memory overflows during long sessions.
Unlike standard script-based cleaners, this plugin runs natively via BepInEx, allowing it to "Lock" the GC when memory is safe (ensuring smooth framerates) and "Force Clean" intelligently when necessary.
Key Features
Zero-Stutter Mode (GC Locking)
The plugin locks the Mono Garbage Collector to prevent it from running randomly during gameplay, which is the main cause of periodic lag spikes in VaM.
GC is only allowed to run when memory usage hits your defined limit.
Smart Auto-Triggers
On Scene Load: Automatically performs a deep clean right after a scene finishes loading.
On Person Removed: Automatically cleans up memory when you delete a character, preventing "ghost" data from clogging your RAM.
Includes "Debounce" technology: If you delete multiple characters quickly, it waits until you are done before cleaning.
Smart RAM Detection
On first launch (or hardware change), the plugin detects your total System RAM and automatically sets a safe Memory Limit (defaulting to ~50% of your total RAM).
Requirements
Virt-A-Mate (v1.20 or newer recommended)
BepInEx 5.x (x64) installed in your VaM folder.
Installation
Ensure you have BepInEx installed. (If you see a BepInEx folder in your VaM root directory, you are good to go).
Copy the NativeGCPatcher.dll file into: .../Virt-A-Mate/BepInEx/plugins/
Start the game. You should see a status overlay in the top-left corner.
Controls & Usage
Ctrl + G: Toggle the Settings Window.
Overlay Status:
Active : GC is running normally (or locked safely).
Locked : GC is suppressed to ensure smooth FPS.
PAUSED : Emergency Stop. Memory usage is critically high; the plugin has disabled itself to prevent crashes.
Enable Plugin : Turns the entire logic on/off.
Memory Limit (GB) :
If your memory is less than 16GB, the plugin will not take effect.
The Min value is set to 8GB, and the Max value is your memory capacity of -8GB.
The threshold where GC is allowed to run. If usage is below this, GC is locked for smoothness.
GC On Scene Load : Triggers a cleanup immediately after a scene loads. Highly recommended.
GC On Person Removed : Triggers a cleanup when a Person atom is destroyed.
Show Overlay : Displays the mini status info in the top-left corner.
Configuration
You can edit settings via the in-game window (Ctrl+G) or by editing the config file at:
.../Virt-A-Mate/BepInEx/config/com.yours.gcpatcher.cfg
FAQ
Q: Why does the game freeze for a second sometimes?
A: That is the "Force GC" kicking in. It freezes the game briefly to reclaim memory. This is intentional and happens only when you hit your Memory Limit or trigger an event (like loading a scene), preventing random stutters during gameplay.
Q: My Memory Limit changed automatically?
A: The plugin detected a change in your system hardware (e.g., you upgraded RAM or moved to a new PC) and auto-adjusted the limit to a safe value.
Native GC Patcher is a high-performance memory management plugin for Virt-A-Mate (VaM). It interacts directly with the game's Mono runtime to control Garbage Collection (GC), eliminating micro-stutters caused by frequent GC spikes and preventing memory overflows during long sessions.
Unlike standard script-based cleaners, this plugin runs natively via BepInEx, allowing it to "Lock" the GC when memory is safe (ensuring smooth framerates) and "Force Clean" intelligently when necessary.
Key Features
Zero-Stutter Mode (GC Locking)
The plugin locks the Mono Garbage Collector to prevent it from running randomly during gameplay, which is the main cause of periodic lag spikes in VaM.
GC is only allowed to run when memory usage hits your defined limit.
Smart Auto-Triggers
On Scene Load: Automatically performs a deep clean right after a scene finishes loading.
On Person Removed: Automatically cleans up memory when you delete a character, preventing "ghost" data from clogging your RAM.
Includes "Debounce" technology: If you delete multiple characters quickly, it waits until you are done before cleaning.
Smart RAM Detection
On first launch (or hardware change), the plugin detects your total System RAM and automatically sets a safe Memory Limit (defaulting to ~50% of your total RAM).
Requirements
Virt-A-Mate (v1.20 or newer recommended)
BepInEx 5.x (x64) installed in your VaM folder.
Installation
Ensure you have BepInEx installed. (If you see a BepInEx folder in your VaM root directory, you are good to go).
Copy the NativeGCPatcher.dll file into: .../Virt-A-Mate/BepInEx/plugins/
Start the game. You should see a status overlay in the top-left corner.
Controls & Usage
Ctrl + G: Toggle the Settings Window.
Overlay Status:
Active : GC is running normally (or locked safely).
Locked : GC is suppressed to ensure smooth FPS.
PAUSED : Emergency Stop. Memory usage is critically high; the plugin has disabled itself to prevent crashes.
Enable Plugin : Turns the entire logic on/off.
Memory Limit (GB) :
If your memory is less than 16GB, the plugin will not take effect.
The Min value is set to 8GB, and the Max value is your memory capacity of -8GB.
The threshold where GC is allowed to run. If usage is below this, GC is locked for smoothness.
GC On Scene Load : Triggers a cleanup immediately after a scene loads. Highly recommended.
GC On Person Removed : Triggers a cleanup when a Person atom is destroyed.
Show Overlay : Displays the mini status info in the top-left corner.
Configuration
You can edit settings via the in-game window (Ctrl+G) or by editing the config file at:
.../Virt-A-Mate/BepInEx/config/com.yours.gcpatcher.cfg
FAQ
Q: Why does the game freeze for a second sometimes?
A: That is the "Force GC" kicking in. It freezes the game briefly to reclaim memory. This is intentional and happens only when you hit your Memory Limit or trigger an event (like loading a scene), preventing random stutters during gameplay.
Q: My Memory Limit changed automatically?
A: The plugin detected a change in your system hardware (e.g., you upgraded RAM or moved to a new PC) and auto-adjusted the limit to a safe value.
Contains executable files or external scripts. Ensure you trust the creator and apply your own security measures.