[gst-devel] valgrind

Benjamin Otte in7y118 at public.uni-hamburg.de
Mon Apr 5 15:00:03 CEST 2004


Hi gang,

I have added support for valgrind to the GStreamer core. See the ChangeLog
and source for more details.

Some attempt at a FAQ follows:

What does it do?
It detects memleaks better. Particularly GstBuffer and GstEvent. Basically
everything that is mempooled. (Did I mention we should mempool caps and
structures?)

When does it do it?
If GStreamer is compiled with --enable-debug (it is by default) and
valgrind libs are present (detected via pkgconfig), that support is
enabled.

How does it do it?
Valgrind provides a little lib interface for apps to communicate better
with valgrind. Look at /usr/include/valgrind/*.h - the source is
documented nicely.

Where's the catch?
GStreamer now uses different code inside valgrind than outside. So there
may be a very little chance that bugs only appear inside or outside
valgrind. So don't be too surprised if that happens. GStreamer warns you
about that when it runs inside valgrind.


As always, if there are issues with this, file a bug or ask me on IRC.

Happy bug and leak hunting,

Benjamin





More information about the gstreamer-devel mailing list