Memory Leaks bite the dust

In my work for the summer, the software simultaneously captures three images of an object with a grid printed on it. The three images are used to build a three-dimensional model of the object. There is information added to this as well, but it is related to the process that is unique to the company so I can’t say what it specifically is. However, we put new cameras into the system this summer. The new cameras are 22208×3000 resolution. With the larger image sizes the program leaks memory like never before and is incredibly slow with all of the data in memory being processed.
To tackle these issues, I have been using Valgrind. Initially, the software used so much RAM that even with a 4GB swap file, memory would run out with the extra memory used by Valgrind. I then contacted other Valgrind users and they suggested I try a newer version that had less memory overhead. It worked. I have since discovered the following  leaks: memory was not released from several structures. The user interface was never freed. There were some miscellaneous unclosed file descriptors. Anyhow, these are mostly fixed. I would, however, like to make the user interface lazily initialized so that the memory intensive portions can be freed when not displayed.
There are definitely other issues remaining, but they are being tackled each day.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.