I have a memory leak in a legacy application that I would like to get rid of (that is, I want to get rid of the memory leak, not the legacy application
I have “de-leaked” the application as good as I know how, and I can find no leaks in the code. So I started looking elsewhere for the error.
We have set up /tmp as a link to /dev/shmem. The application writes and deletes files on /tmp. One of the guys I work with noticed that the memory leak all but disappeared if we turned off this deleting/writing or if we wrote/deleted to something other than /tmp. We can’t turn this file writing in the finished system, so we have to have that, but from this hint I guessed that there’s something funky about the /dev/shmem filesystem and how our application interacts with it.
I had /tmp point to a ramdisk made with devb-ram, and this also made the leak go away.
Has anyone had similar “mysterious” issues with /dev/shmem and memory leakages related to writing/deleting files?
devb-ram would be a good solution, except that it partitions the memory in a way that leaves us with too little memory for the app and too little “disk” space.
Any hints or tips are greatly appreciated.
We are on QNX 6.3.0.