Maybe this is a bad idea, but my thought is, assuming you are on a 64 bit system, virtual memory is basically infinite.
So, when you start getting close to available physical memory, reserve as much virtual memory as there is physical memory.
Then commit pages as you need them.
So, when you start getting close to available physical memory, reserve as much virtual memory as there is physical memory. Then commit pages as you need them.