[gst-devel] Debugging memory allocation

Edward Hervey bilboed at gmail.com
Thu Mar 12 12:42:01 CET 2009


On Thu, 2009-03-12 at 12:27 +0100, Daniel James Laird wrote:
> All,
> 
> I am having real difficulty debugging memory allocation in my application.
> 
> Can anyone help
> 
> 1.) How do I enable GST_BUFFER debug to that I can see what is going on
> 
> I usually do export GST_DEBUG=XXXX:[1-5] but using GST_BUFFER does not
>  seem to work, I cant find anything in docs etc on how to turn on this
>  debug using env variables.
> 

  You can figure out all available debugging categories by doing the
followoing:
  gst-inspect-0.10 --gst-debug-help

  The one you're maybe looking for are GST_REFCOUNTING, which will show
you all the refcounting going on on gstreamer objects (including buffers
and events). You basically want to see the refcount going back down to
0, causing the buffer to be released.
   If you're creating your own buffers, don't forget to set
GST_BUFFER_MALLOCDATA(mybuffer) to the same value as
GST_BUFFER_DATA(mybuffer), else it won't get freed when the buffer is
released.

> 2.) I use dynamic library loading and this seems to mean that both
>  memwatch and mtrace are not too useful as I can not get the caller
>  fields to be filled with anything other than a hex address which is
>  not as helpful as I had hoped. Using valgrind on a mips platform does
>  not work either.
> 
> I would love to know how others are debugging memory leaks etc when
>  using gstreamer on embedded devices.  In the mean time finding out how
>  to get GST_BUFFER debug to come out would be really helpful.
> 
> hope you can help
> Daniel Laird 
> 
> ------------------------------------------------------------------------------
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel





More information about the gstreamer-devel mailing list