Issue #1630746 by tim.plunkett: Fixed Checking for 'twice the available memory limit' fails when running on a system with a memory_limit() of -1.