Since months, players are reporting this error : “Lua Panic Not enough memory”
Even 16gb ram users have this error, i bet it’s from the 15gb of textures/geometry of cars/weapon/nudes_mods or whatever.
The idea is to keep all the engine and Lua related data in the process
and send all the textures/models to an external process (Or many as we need) when they are created via VirtualAllocEx->WriteProcessMemory.
And when they are visible on screen (or a bit before ), load them back to game process and create them as d3d objects in video memory.
I know it’s not going to be as simple as it sound, a lot of d3d magic hook are required to don’t fuck up the game.
That’s what ENB is doing on Skyrim, the process never use more than 400mb and the memory host process is at ~2gb of memory.
But ENB’s dll is protected with Yoda protector so we can’t really see how it works. (RIP IDA).