Check that the initial memory for superoptimization does not exceed the max cost.