Re: Valgrind and GTK libraries

2010-01-04 Thread David Nečas
On Tue, Jan 05, 2010 at 10:21:36AM +1100, Erik de Castro Lopo wrote: > > Well I consider this a *real* leak that needs to be fixed. Then it's best to start with the simplest posible code that reproduces the leak. By writing it you a) verify the leak is not in your app b) give anyone trying to fi

Re: Valgrind and GTK libraries

2010-01-04 Thread David Nečas
On Mon, Jan 04, 2010 at 02:56:44PM -0800, Dan Kegel wrote: > Erik de Castro Lopo wrote: > >  ==12528== 27,300 bytes in 175 blocks are still reachable in loss record > > 11,194 of 11,196 > >  ==12528==    at 0x4024C1C: malloc (vg_replace_malloc.c:195) > >  ==12528==    by 0x4B342E3: g_malloc (gmem

Re: Valgrind and GTK libraries

2010-01-04 Thread David Nečas
On Tue, Jan 05, 2010 at 09:39:48AM +1100, Erik de Castro Lopo wrote: > ==12528== 27,300 bytes in 175 blocks are still reachable in loss record > 11,194 of 11,196 > ==12528==at 0x4024C1C: malloc (vg_replace_malloc.c:195) > ==12528==by 0x4B342E3: g_malloc (gmem.c:131) > ==12528==

Re: Valgrind and GTK libraries

2010-01-04 Thread Erik de Castro Lopo
Dan Kegel wrote: > Erik de Castro Lopo wrote: > >  ==12528== 27,300 bytes in 175 blocks are still reachable in loss record > > 11,194 of 11,196 > >  ==12528==    at 0x4024C1C: malloc (vg_replace_malloc.c:195) > >  ==12528==    by 0x4B342E3: g_malloc (gmem.c:131) > >  ==12528==    by 0x4B4A418: g

Re: Valgrind and GTK libraries

2010-01-04 Thread Dan Kegel
Erik de Castro Lopo wrote: >  ==12528== 27,300 bytes in 175 blocks are still reachable in loss record > 11,194 of 11,196 >  ==12528==    at 0x4024C1C: malloc (vg_replace_malloc.c:195) >  ==12528==    by 0x4B342E3: g_malloc (gmem.c:131) >  ==12528==    by 0x4B4A418: g_slice_alloc (gslice.c:824) >

Re: Valgrind and GTK libraries

2010-01-04 Thread Erik de Castro Lopo
Bill C wrote: > Valgrind is an excellent product, and is designed for programmer use only. > > It shows where unreleased memory was allocated, so one can trace each > chunk of memory to see if it should have been released, and take > appropriate action it your code allocated it. That is easy w

Re: Valgrind and GTK libraries

2010-01-04 Thread Dan Kegel
On Sat, Jan 2, 2010 at 4:20 AM, wrote: > 2010/1/1 Erik de Castro Lopo : >>  - How does one go about teasing out the difference between my memory >>   leaks and GTK stuff I have no control over? > > I usually run my app twice: once with just startup/shutdown and once > with startup/run for a while

Re: Valgrind and GTK libraries

2010-01-04 Thread Bill C
2010/1/1 Erik de Castro Lopo : - How does one go about teasing out the difference between my memory leaks and GTK stuff I have no control over? Just a few thoughts Valgrind is an excellent product, and is designed for programmer use only. It shows where unreleased memory was

Re: Valgrind and GTK libraries

2010-01-02 Thread jcupitt
2010/1/1 Erik de Castro Lopo : >  - How does one go about teasing out the difference between my memory >   leaks and GTK stuff I have no control over? I usually run my app twice: once with just startup/shutdown and once with startup/run for a while/shutdown. The diff between the two runs (with a l

Valgrind and GTK libraries

2010-01-01 Thread Erik de Castro Lopo
Hi all, I working on an existing code base written by someone else and during my debugging I ran the program under Valgrind. This was very useful for finding uses of unitialised memory etc, but also showed some quite severe memory leak problems. I've managed to track down a large number of the le