&gt; ... no one knows how to reasonably test the additional code ...<p>wouldn&#x27;t a simple &#x27;ulimit -m&#x27; set appropriate limits on memory for the process ? and then use that to simulate failures, and hopefully see what breaks, fix it, and rinse-lather-repeat ?<p>edit-1: this is ofcourse predicated on the fact that you are using a unix like system.