On 04/29/2010 12:28 AM, hap497 wrote: > On Apr 28, 9:21 am, Stefan <n...@gersys.de> wrote: >> Hi >> >> I've built TestGtkEmbed from current mozilla-central trunk. >> Starting TestGtkEmbed through valgrind (with about:open) and then >> closing it via the File menu, valgrind is complaining about a lot of leaks. >> >> ==20759== HEAP SUMMARY: >> ==20759== in use at exit: 834,159 bytes in 8,450 blocks >> ==20759== total heap usage: 55,254 allocs, 46,804 frees, 12,056,530 >> bytes allocated >> ==20759== >> ==20759== LEAK SUMMARY: >> ==20759== definitely lost: 2,080 bytes in 8 blocks >> ==20759== indirectly lost: 7,720 bytes in 382 blocks >> ==20759== possibly lost: 400,058 bytes in 2,762 blocks >> ==20759== still reachable: 424,301 bytes in 5,298 blocks >> ==20759== suppressed: 0 bytes in 0 blocks >> ==20759== Rerun with --leak-check=full to see details of leaked memory >> ==20759== >> >> Most of the "possible" leaks seem to stem from various libraries, but >> others from TestGtkEmbed.cpp. >> >> I'm just curious, is there something wrong with my build or do you also >> see these leaks? >> >> Is TestGtkEmbed.cpp the best basis for embedding mozilla into a gtk app? >> >> Thanks, >> Stefan > > I would like to know how you setup mozilla to run with valgrind. Can > you please provide the steps of how you did it? > > Thank you.
I got valgrind from my distro and simply ran it like this: $ valgrind --tool=memcheck ./TestGtkEmbed And I've built mozilla with this .mozconfig: mk_add_options moz_objd...@topsrcdir@/../mozilla-build_new mk_add_options AUTOCONF=autoconf2.13 ac_add_options --enable-application=browser ac_add_options --disable-crashreporter I've just found this page https://developer.mozilla.org/en/Debugging_Mozilla_with_Valgrind which suggests building mozilla using the following options. ac_add_options --enable-tests ac_add_options --enable-optimize="-g -O -freorder-blocks" ac_add_options --disable-jemalloc ac_add_options --enable-valgrind mk_add_options MOZ_MAKE_FLAGS="-j4" Will try this now and see if gives the same result. Stefan. _______________________________________________ dev-embedding mailing list dev-embedding@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-embedding