Hi all,
For a while now i've been working on a video broadcasting server (namely VLC) under linux. Obviously the program runs (or should run) permanently as a daemon.
My problem is when constantly running for several days the program crashes (segfault) as of OOM (memory full). Of course this indicates a memory leak somewhere.... the problem is where? or is it...?
The program is naturally multithreaded and the sheer volume of mallocs and frees as well as their not always straightforward distribution is a bit of a pain...
I must admit that the core dump has not helped much... Anyway... here's my bottom line:
a) When the program crashes the memory (seen from 'top') is not freed.
b) 'top' does not indicate any increase in resource usage from the particular pid. Also, the overall memory consumed is at any time much more than that procecess reportedly use (summed up). The overall used memory constantly increases but the process percentages are the same...
c) Valgrind (i.e. memcheck - almost) does not detect any MAJOR leaks somewhere... There are bits leaked but only amount to a few Ks.
So... my question is... is it possible that the program is killed while memory is leached from a different process altogether? Any ideas on how i can track what is causing the leak? I'm trying to make some use of the info under /proc (this should be linux specific) but no luck so far...
any ideas how i can track such a leak down??
many thanks everyone and sorry for the long and not very detailed report...
Nik