I am trying to check the memory leakage of my program using Valgrind.
Note: my program contains an FSM which is polled at every 200ms.(mentioning this because I think this might have something to do with the leaks) I have executed the following command and created the log file. *valgrind --leak-check=full --track-origins=yes --verbose --log-file=valgrind_test.log ./foo* I see there are leaks in the gst library, and 90% of them are following the same route/path as given below *==9890== 96 bytes in 1 blocks are possibly lost in loss record 2,341 of 2,707 ==9890== at 0x4C30035: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==9890== by 0x66D96B0: g_malloc0 (in /usr/lib64/libglib-2.0.so.0.5400.3) ==9890== by 0x69CB421: ??? (in /usr/lib64/libgobject-2.0.so.0.5400.3) ==9890== by 0x69CB5CA: ??? (in /usr/lib64/libgobject-2.0.so.0.5400.3) ==9890== by 0x69D1062: g_type_register_fundamental (in /usr/lib64/libgobject-2.0.so.0.5400.3) ==9890== by 0x6CBADD1: gst_fraction_get_type (gstvalue.c:7428) ==9890== by 0x6CBB0B5: _priv_gst_value_initialize (gstvalue.c:7527) ==9890== by 0x6C23B50: init_post (gst.c:777) ==9890== by 0x66E011F: g_option_context_parse (in /usr/lib64/libglib-2.0.so.0.5400.3) ==9890== by 0x6C2462E: gst_init_check (gst.c:427) ==9890== by 0x6C24676: gst_init (gst.c:471) ==9890== by 0x5546CC: main (foo.cpp:97)* how to find what this mean and solve this *==9890== by 0x69CB421: ??? (in /usr/lib64/libgobject-2.0.so.0.5400.3)* -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Dear Rohan,
Here is a script i'm using to clean up the glib false positive leaks:
export G_SLICE=always-malloc
export G_DEBUG=gc-friendly
export GLIBCPP_FORCE_NEW=1
export GLIBCXX_FORCE_NEW=1
SUPP="--suppressions=glibc-2.3.supp
--suppressions=gst.supp"
OPTS="-v --trace-children=yes --track-fds=yes --time-stamp=yes --tool=memcheck
--leak-check=full --leak-resolution=high --freelist-vol=10000000 --show-reachable=yes
--num-callers=40 ${SUPP}"
GOTO="> result.txt 2>&1"
valgrind $OPTS $* > result.txt 2>&1
glibc-2.supp
gst.supp
Hope it helps.
Sent from the GStreamer-devel mailing list archive at Nabble.com. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Rohan0993
Sorry for the previous malformed message.
Dear Rohan, Here is a script i'm using to clean up the glib/gst false positive leaks: /export G_SLICE=always-malloc export G_DEBUG=gc-friendly export GLIBCPP_FORCE_NEW=1 export GLIBCXX_FORCE_NEW=1 SUPP="--suppressions=glibc-2.3.supp --suppressions=gst.supp" OPTS="-v --trace-children=yes --track-fds=yes --time-stamp=yes --tool=memcheck --leak-check=full --leak-resolution=high --freelist-vol=10000000 --show-reachable=yes --num-callers=40 ${SUPP}" GOTO="> result.txt 2>&1" valgrind $OPTS $* > result.txt 2>&1 / glibc-2.supp <http://gstreamer-devel.966125.n4.nabble.com/file/t377496/glibc-2.supp> gst.supp <http://gstreamer-devel.966125.n4.nabble.com/file/t377496/gst.supp> Hope it helps. -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Rohan0993
Le lun. 20 mai 2019 07 h 25, Rohan0993 <[hidden email]> a écrit : I am trying to check the memory leakage of my program using Valgrind. We have a suppression in the main got repository for that, you might also need the one from glib (this one is often installed with the -devel package).
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |