Prevent 3D Slicer to close on missing RAM

Typically, computers with 8 GB of RAM are enough to run my module, but sometimes I need 12 GB.

Is there any way to prevent Slicer from silently and instantly crashing when it reaches the PC’s RAM limit?

The crashes occurr often when user apply Grow From Seeds, or Image Fusion.
Loading is also a (rare) problem.,if user try to add a big volume or many volumes, RAM goes up too.

You can increase the amount of virtual memory in your computer. It will work slow, but Slicer will not crash due to OOM.