The general principle will work for Windows also if you use Windows. You will just have to look up how to increase your swapfile size for Windows.
On native linux just like a lot of people after 1-3 hours the game will just freeze, with it using almost all of the systems ram. You can increase your swapfile size, which is memory stored on the ssd instead of ram. Which is not optimal, but it has fixed my crashing all of a sudden every 1-3 hours.
Here is how to do it on Linux in the console, the size you set your swapfile size is usually equal to the amount of ram you have, so 8G, 16G, 32G ,etc This will make a file on your ssd as the swapfile, so it will take up that much disk space.
swapoff -a
fallocate -l 16G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
Then verify the swapfile is on and was created by issuing,…
swapon /swapfile
This has fixed my periodic crashing every 1-3 hours due to LE using up all of the ram. It’s not optimal, because you would want all of the memory on RAM, and not your ssd, but it does work.