Added facility for allocating memory within the solver.