Re: How to confirm a memory leak

2016-08-01 Thread Emmanuele Bassi
Hi; On 30 July 2016 at 14:58, wrote: > You need to set the malloc routines to use the real system malloc; > > export G_DEBUG=gc-friendly > export G_SLICE=always-malloc With recent (2 years old at least) versions of GLib, `G_SLICE=always-malloc` is not necessary: GLib will detect

Re: How to confirm a memory leak

2016-08-01 Thread Norman Goldstein
Thank you for the responses. I will just assume that valgrind, very useful and appreciated tool that it is, does not keep up with the software's memory management approach, and I will suppress leaks that I cannot otherwise explain. Still puzzled, of course, as to why if "name_owner" is eventu

Re: How to confirm a memory leak

2016-08-01 Thread Emmanuele Bassi
Hi; On 30 July 2016 at 20:00, Norman Goldstein wrote: > It seems the debug version is less confusing for valgrind, or > >*** Does the debug code actually present different source code to the > compiler? Yes; debugging code enables various code paths that are meant to make it easier for deve

Re: How to confirm a memory leak

2016-08-01 Thread Norman Goldstein
Thank you for this. I have attached the source for the code being tested. The valgrind report, attached, was greatly pared down, as a consequence of your suppression file. I ran valgrind twice: 1st time: No debug info -- 519 bytes definitely lost 2nd time: With debug info -- 7 bytes definitel

Re: How to confirm a memory leak

2016-07-30 Thread jcupitt
You need to set the malloc routines to use the real system malloc; export G_DEBUG=gc-friendly export G_SLICE=always-malloc I have this suppressions file: https://github.com/jcupitt/libvips/blob/master/libvips.supp That's for a gobject-based library, you might need to ad