How to prevent Blender from crashing when running out of memory?
If you are out of memory, the only solutions are to install more RAM in the computer, or to make the paging file (virtual memory stored on disk) in the OS larger.
Or work in scenes that do not exceed the resources available in your computer. Don't abuse the number of particles, use instances instead of duplicates, use modifiers and set subdivision surface to low values Blender render crash when using subsurf modifiers.