adding more memory checks for arpack_cg and eigenvalues_arpack