Re: deleting a map does not release the corresponding memory from RAM.

Posted by Amber on
URL: http://official-rtab-map-forum.206.s1.nabble.com/deleting-a-map-does-not-release-the-corresponding-memory-from-RAM-tp9102p9113.html

Hi Mathieu,

Thank you for your response. I tried with rtabmap_ros-0.20.18-noetic. Unfortunately, it did not help. Please see a small demo video for the same. I used three .db files with the following sizes.


map_1.db (790MB)
map_2.db (1.5GB)
map_3.db (1.4GB)

I expect that when a new .db will be loaded the memory occupied by the previous .db will be released which is not happening.
p.s.
map_2 and map_3 have a lot of overlap in terms of the occupancy grid covered in the map.

Also, it may not be significant, but the .db file was prepared from an older version of rtabmap.

I also commented out a portion from loadDatabaseCallback(...) in CoreWrapper.cpp to just close rtabmap and not initialize again. I see that it does not release any memory.


I observed that,
at L243 from Memory.cpp, these signatures once loaded are not being released, even though I follow the routine written in the loadDatabaseCallback().

_dbDriver->loadSignatures(std::list<int>(ids.begin(), ids.end()), dbSignatures);

One doubt comes to my mind. Is there any memory leakage in DBDriverSqlite3.cpp?

Please suggest.

Thank you,