|
From: Dennis L. <pla...@in...> - 2005-05-17 04:28:56
|
Am Montag, den 16.05.2005, 03:31 +0200 schrieb Admir Efendic: > Hi! > > How do you go about checking for leaks using glib-2.0? I allocate memory > with glib functions, mainly: > - g_string_new() - for GString* > - g_new() - for mostly everything else > - g_free() - instead of doing free(). > > Now I believe the above functions use something like g_malloc, > g_realloc, etc, which may or may not be macros (not sure). > > I have a multithreaded app, using glib and NPTL threads on gentoo linux. > It goes something like: > > main.c spawns threads > my_threads.c is the code where the actual leak is > > the valgrind reports leaks in following order: > > glib.2.xxx.so > main.c > > or similar, the point being that it does not report where in > my_threads.c the leak is. It doesnt mention my_threads.c at all. Have you checked FAQ 4.4 so you use --num-callers for complete stacktrace and everything else to make stack trace more helpful ? |