when i use
CAROM::Matrix* interpolated_matrix = interpolator.interpolate(&desired_point);
Memory increases by 4MB each time it is called.
So i check the code,when call dposv in void MatrixInterpolator::obtainLambda() make it.
so , I replaced dposv with eigen
Eigen::Map<Eigen::MatrixXd> A(B->getData(), gamma_size, gamma_size);
//
Eigen::Map<Eigen::MatrixXd> X(f_T->getData(), gamma_size, num_elements);
//
Eigen::LLT<Eigen::MatrixXd, Eigen::Upper> llt(A);
//
if (llt.info() != Eigen::Success) { /* error */ }
llt.solveInPlace(X);