SparseMatrix class does not enforce the EIGEN_NO_MALLOC macro
Submitted by velin
Assigned to Nobody
Link to original bugzilla bug (#1185)
Version: 3.2
Description
(this might have been reported already or it might be a "feature" but just in case I prefer to open a ticket)
The SparseMatrix class (defined in SparseCore/SparseMatrix.h) does not enforce the EIGEN_NO_MALLOC macro; "std::malloc" and "std::free" are directly called at various locations in the code (as far as I can tell it seems to always be related to resizing operations on the inner and outer indices storage).
I am not sure this is to be considered as a bug but it is somewhat troublesome that in spite of defining the EIGEN_NO_MALLOC macro there are still malloc calls behind the scene.
It seems the fix would be easy to implement by using the functions defined in Memory.h; I can provide a quick draft if needed.