On Sun, Dec 02, 2007 at 01:52:20PM -0500, Matthew Lye wrote: > > On 2-Dec-07, at 12:03 PM, Christian Biere wrote: > > These two are not really memory leaks. They are not accumulating. It's > > some memory allocated at startup used for the whole run time. It's > > only > > a "leak" in so far that the memory isn't released on exit. > > If I understand correctly, the leak reporting relies on whether or not > there's a pointer to the memory block, or some such thing.
I'm assuming it means if there is still a accessible pointer to the block of memory. It's quite usual for Unix program to allocate memory and never free it as the OS will claim it all back when the program ends. However you can check to see if there are still accessible pointers to the allocated memory at the end of your run. Unfortunately you can't just check memory for them as they may be orphaned. ------- ------- --- |A *--|--->|B *--|--->|C| ------- ------- --- If A get free() without cleaning up B and C then a pointer to C will still exist in memory but the program will never be able to find it as it is orphaned. The situation is complicated if you have many cross linked structures where multiple things may point at them. I wouldn't rule out those reported leaks without looking at the cases where they are free'ed and structures that point to them are free'd. -- Alex, homepage: http://www.bennee.com/~alex/ Presidency: The greased pig in the field game of American politics. -- Ambrose Bierce ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ gtk-gnutella-devel mailing list gtk-gnutella-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel