In short: go to control Panel > System and Security > System > Advanced System settings (on the left) > Advanced > under “performance” click settings > advanced
Here you can allocate virtual memory. In my case, I selected the disk Diablo II R is on then choose “system managed size” then clicked “set”.
Before this I could not run diablo if I had internet browser on or even discord. and even if I closed everything else, every time I started a new game or went through a portal there was a chance for crashing.
Thanks to other players who posted this somewhere in US bug report forums. I am reposting the solution here since it was tough to find and it worked for me. No guarantees that it will work for you but please give it a try if your crashing often.