Gstreamer Memory Tracing using mtrace
Randall Scheifele
rjscheif at gmail.com
Tue Jul 23 05:54:58 PDT 2013
Tim,
Thanks for the clarification. Are the one-time allocations you referred to
all done inside the gst_init call? I could move the mtrace function call
to after the gst_init and muntrace before the gst_deinit. However, if
these one time allocations happen all over the place I might be out of luck.
Thanks,
Randy
On Tue, Jul 23, 2013 at 7:47 AM, Tim-Philipp Müller <t.i.m at zen.co.uk> wrote:
> On Tue, 2013-07-23 at 07:33 -0500, Randall Scheifele wrote:
>
> Hi,
>
> > Has anyone attempted to use mtrace with gstreamer? Even with the
> > simplest gstreamer program I get tons of memory not free'd errors.
> >
> >
> > For example, here is my simple program:
> >
> >
> > #include <stdio.h>
> > #include <stdlib.h>
> > #include <gst/gst.h>
> > #include <mcheck.h>
> >
> >
> > int main(int argc, char* argv[])
> > {
> > // Start memory tracing
> > mtrace();
> >
> > // Initialize gstreamer
> > gst_init(&argc, &argv);
> >
> >
> > // Cleanup gstreamer
> > gst_deinit();
> >
> >
> > // Stop memory tracing
> > muntrace();
> >
> >
> > return 0;
> > }
> >
> >
> > When I run this on my ubuntu 10.04 machine running gstreamer 0.10.28,
> > I get the following output from mtrace. I realize that 0.10.28 is an
> > outdated version, but is my test valid? Is there any way I can get
> > mtrace to say no memory leaked?
> >
> >
> > I am actually running gstreamer 0.10.32 on an embedded system and am
> > just playing with mtrace on the host to try and get to a point where I
> > don't get any memory errors. If I can't get the list down I won't be
> > able to determine which errors are always there versus the ones I'm
> > interested in fixing in my application or plugins. I've heard good
> > things about valgrind, but it is not ported for my target
> > architecture.
>
> Both GStreamer and GLib/GObject will do a number of one-time
> allocations, which will may never be cleaned up, so it's kind of
> expected that you still see allocated memory at the end.
>
> Cheers
> -Tim
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130723/1b6d7d41/attachment.html>
More information about the gstreamer-devel
mailing list