Re: [gmime-devel] Possible memory leakage in gmime



Vsevolod Stakhov wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I'm using gmime (ver 2.2.21) for writing spam filter and found that I
> have strange memory issues with it. I wrote a simple test, that can be
> found here:
> http://cebka.pp.ru/stuff/test_gmime_mem.c
>   

When debugging memory leaks (or other memory issues) in glib-based
programs, you typically want to set the G_SLICE environment variable to
"always-malloc" because the GSlice memory allocator confuses programs
like valgrind.

If you `export G_SLICE=always-malloc` and re-run your program under
valgrind and still find leaks (other than the ones from initializing the
GType system), then it should be a lot simpler to track down the memory
leaks.

I'll take a closer look (hopefully) tonight when I get a chance if you
haven't done so by the time I get around to it.

Jeff



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]