X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=doc%2Fdevelopment.txt;h=7b6c9e3527fecd01445707066ff36780a24337ae;hp=f18070c1e19c7c6682f51ae8e2253dbdd18c18e8;hb=6aa249b5fbead5507a40500d29ef1640832eb2fc;hpb=41075e78197deaa9c7bbaf0f97482c513f497580 diff --git a/doc/development.txt b/doc/development.txt index f18070c1..7b6c9e35 100644 --- a/doc/development.txt +++ b/doc/development.txt @@ -2,9 +2,20 @@ This document describes some principles that should be respected when developing in Babeltrace. Memory usage : + Since Babeltrace exports a library, we need to make sure that all allocated memory is freed, we do not want any memory leaks. Since Babeltrace uses the glib, it is necessary to assist a little valgrind when trying to identify memory leaks. + +libpopt has issues with inconsistency between versions. Namely, libpopt +0.16 allocates memory for the string returned by poptgetArg(), but not +libpopt 0.13. Therefore, we are providing a warning suppression file +that covers this case in the extras/ directory of the source code. + So the proper invocation of Babeltrace with Valgrind is : -G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind --leak-check=full babeltrace + +G_SLICE=always-malloc G_DEBUG=gc-friendly \ + valgrind --leak-check=full \ + --suppressions=path_to_babeltrace_src/extras/valgrind/popt.supp \ + babeltrace