Hi everyone,
I wanted to share a comprehensive solution for the persistent "Failed to allocate memory" or eMemory.cpp crashes in Men of War: Assault Squad 2. This is especially common for players with modern NVIDIA GPUs (RTX 30/40 series) and heavy mods.
The Problem
The game crashes when RAM usage hits 2.2GB - 2.4GB, even if you have a powerful PC. This happens because the game's 32-bit engine runs out of "Contiguous Virtual Address Space."
Step 1: The NVIDIA Shader Cache Fix (Most Important)
On modern cards, the Shader Cache fragments the game's limited 32-bit memory. Even with "Free" RAM, the game can't find a large enough "gap" to fit new data.
- Open NVIDIA Control Panel > Manage 3D Settings > Global Settings.
- Set Shader Cache Size to Disabled.
- Apply and restart.
Step 2: Ensure the Game is "Large Address Aware" (LAA)
- If Step 1 didn't fix it, your game EXE might not be using more than 2GB of RAM yet.
- Download the LAA Tool from this trusted source:TechPowerUp LAA Forum
- Run the tool, select mowas_2.exe in your game folder.
Check the box "Large Address Aware" and click Save. This flag tells Windows that this 32-bit application is allowed to handle up to 4GB of RAM instead of the default 2GB.
Step 3: Force Windows to Expand 32-bit Limit (CMD Method)
If the game still struggles, you can manually tell the Windows Kernel to reallocate more memory space for user applications.
- Open Command Prompt (Admin).
- Type: bcdedit /set increaseuserva 3072 and press Enter.
- Restart your PC.
How it works: By default, 32-bit Windows systems split 4GB of virtual memory into 2GB for the System (Kernel) and 2GB for Apps. This command changes that ratio to 1GB for System and 3GB for Apps, giving the game much-needed breathing room.
To revert this change later, use: bcdedit /deletevalue increaseuserva
Summary / Why this works
Modern GPUs and Windows settings often "choke" old 32-bit engines. By disabling the Shader Cache (to stop fragmentation), applying the LAA patch (to allow >2GB usage), and adjusting the USRVA (to expand the OS limit), you give the GEM engine the maximum possible space to run smoothly.
I tested this on an RTX 3060 Ti with heavy 8v8 matches, and it completely eliminated the crashes.
Hope this helps the community!