[gst-devel] RE : Re: Memory leaks

Stefan Kost ensonic at hora-obscura.de
Wed Sep 26 19:07:12 CEST 2007


hi,


Steve Fink wrote:
> On 9/22/07, James Doc Livingston <doclivingston at gmail.com> wrote:
>> On Sat, 2007-09-22 at 09:31 -0700, Steve Fink wrote:
>>> I think it was 0.10.13 originally? But I get the same thing with current CVS.
>>>
>>> ==00:00:03:44.899 25856== 719,760 bytes in 8,997 blocks are definitely
>>> lost in loss record 2,505 of 2,505
>>> ==00:00:03:44.899 25856==    at 0x4021620: malloc (vg_replace_malloc.c:149)
>>> ==00:00:03:44.899 25856==    by 0x415A2C5: g_malloc (gmem.c:131)
>>> ==00:00:03:44.899 25856==    by 0x4169E97: g_slice_alloc (gslice.c:777)
>>> ==00:00:03:44.899 25856==    by 0x416A214: g_slice_alloc0 (gslice.c:784)
>>> ==00:00:03:44.899 25856==    by 0x40FF336: g_type_create_instance (gtype.c:1549)
>> <snip>
>>
>> You'll want to run this with the environment variables
>> G_SLICE=always-malloc and G_DEBUG=gc-friendly set, otherwise you'll get
>> the above false positive from glib's slice allocator.
> 
> I am. I run valgrind with the shell script below. How can I tell if
> they are false positives? (I *am* observing memory use going up, after
> all.)
> 
> export GLIBCPP_FORCE_NEW=1
> export GLIBCXX_FORCE_NEW=1
> export G_SLICE=always-malloc
> export G_DEBUG=gc-friendly
> 
> DP="/home/sfink/"
> SUPP="--suppressions=/usr/lib/valgrind/glibc-2.3.supp
> --suppressions=${DP}gstreamer/common/gst.supp
> --suppressions=${DP}gst-plugins-base/common/gst.supp
> --suppressions=${DP}gst-plugins-good/common/gst.supp"
> 
> OPTS="-v --trace-children=yes --track-fds=yes --time-stamp=yes
> --tool=memcheck --leak-check=yes --leak-resolution=high
> --freelist-vol=10000000 --num-callers=40 ${SUPP}"
> 
> exec valgrind $OPTS "$@"

With those suppresions in use the shown leaks might be real. Start with the
"definitely lost" and look at the code. Its hard, but thats the game.

Stefan




More information about the gstreamer-devel mailing list