Registered Member
|
Hello everybody,
I am quite new to Eigen so, I am doing maybe some trivial mistake but I have problem with freeing memory of VectorXf. I am working on a Linux application which use VectorXf for storing seismic trace. I use VectorXf as class member and VectorXf is loaded with data in supplementary thread. The problem is that when I want to release memory by calling resize(0) VectorXf member function in main thread, the vector size is set to 0, however it seems that the memory isn't actually released to the system (I was checking the process explorer and the memory attached to the process has not changed). Do you have any idea what could cause such a behaviour? Thanks, Sergej. P.S. I call Eigen::initParallel() during initialization of the application. |
Registered Member
|
Just curious why you think resize() will release memory.
Is there somewhere in the Eigen doc mentions that? |
Moderator
|
Calling .resize(0) does free the memory through a call to system's free() function. The fact you don't see it in your monitor is because the system chose to reserve this chunk to your app.... but don't worry it is really freed.
|
Registered users: Bing [Bot], Evergrowing, Google [Bot], rockscient