[gst-devel] Memory Leak in Queue Element?

Mohit Garg mohit.hotpop at gmail.com
Thu Aug 16 09:20:54 CEST 2007


Hi All,

I am a newbee and am trying to study a simple pipeline (filesrc -> queue ->
filesink) under different threading conditions. I am seeing memory leaks in
"top" in some of them. However, valgrind does not report leaks in any case.
I tried the following:

   - Running the pipeline once. No memory leaks in "top" and valgrind.

   - Running the pipeline multiple times (sequentially) in a single
   parent thread (no child threads spawned by the main application). No memory
   leaks in "top" and valgrind.

   - Running multiple threads with each thread running an independent
   pipeline of the type above. I see memory leaks in "top" but valgrind does
   not show any leaks.
      - Using a ~ 5MB file as input and running 10 threads
      (pipelines), I see "RES" memory usage in "top" increasing to
around 10-12MB
      even after doing a gst_deinit() in the parent thread (after all
threads have
      exited).
      - This memory usage continues to increase as number of threads
      increase.
      - If I do not use a "queue" and directly connect "filesrc" and
      "filesink", I do not see this memory leak in "top".
      - Using a very small file (1 byte), I do not see this leak but
      that may be due to lack of enough leakage in the system.

I am attaching a log file listing the number of threads Vs. memory usage.
Has anyone come across something like this before? Any
pointers/ideas/suggestions on what should I try?

thanks and regards
Mohit Garg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20070816/09f90804/attachment.htm>
-------------- next part --------------
num-		top-(RES)-memory-
threads		after-gst_deinit()
1		4780
2		5820
3		6092
4		7444
5		6780
6		9340
7		7756
8		7844
9		9976
10		11m
11		11m
12		11m
13		12m
14		11m
15		8288
16		12m
17		15m
18		13m
19		12m
20		15m


More information about the gstreamer-devel mailing list