FIX #1791: fail with out-of-heap when allocating more than the max heap size in one go