[gst-devel] Memory leaks
David Schleef
ds at schleef.org
Fri Sep 21 03:24:14 CEST 2007
On Thu, Sep 20, 2007 at 06:03:29PM -0700, Steve Fink wrote:
> I am trying to track down a slow memory leak in my gstreamer pipeline.
> I attempted to simplify the pipeline, but it seems like *every*
> pipeline I try leaks.
>
> For example: audiotestsrc ! filesink location=/dev/null
>
> leaked a very steady 750KB/sec. So I'll write that one off to a major
> refcounting bug in filesink, perhaps.
>
> audiotestsrc ! alsasink
>
> leaked much more slowly, only 3.9KB/sec. Again, though, the leakage
> rate was very steady.
>
> For my element, I tracked down one leak by running with
> GST_DEBUG='GST_REFCOUNTING:5' and grepping for '->80' (the first
> refcount that reached 80, indicating that some object was accumulating
> references over time.) That caught my one leak, but then that trick
> didn't work anymore. Probably because I'm creating a bunch of objects
> whose refcounts never get above 1 or 2, I suppose.
>
> I even tried letting it leak for a while and then dumping out the
> memory region that had grown. It had lots of 0xff in it and no text,
> which didn't tell me much. (My audio signals tend to be 0x00 or
> swerving all over the place, for what it's worth.)
>
> I'm assuming that a PLAYING pipeline shouldn't use up more memory over time?
>
> Any tips?
valgrind.
dave...
More information about the gstreamer-devel
mailing list