I'm not sure if this is right--I've only take a really quick check in libmetrics/linux/metrics.c, and my C-fu is rusty.
It looks like strndup() is called in linux/metrics.c:hash_lookup (about line 131) to dupliate an interface name, which is included in the stats structure as stats->name. The net_dev_stats function will return this struct. The function is called in a number of places pkts_in_func, pkts_out_func, bytes_out_func and bytes_in_func. The variable "*ns" is assigned the output of hash_lookup (e.g. the struct). Since the 'name' element is malloc()ed, but not explictly freed, it will not go away when *ns goes out of scope. This is the leak, isn't it? All four of these functions are very similar, and need to be fixed if this is the case. Or did I miss something obvious? :) On Feb 19, 2008 4:54 PM, Bernard Li <[EMAIL PROTECTED]> wrote: > On 2/19/08, Jesse Becker <[EMAIL PROTECTED]> wrote: > > > I modified my gmond.conf to report much more aggressively than usual > > so that the test time would be shorter. However, with *this > > configuration*, it works out to about 770 bytes per minute. > > So did we want to hunt this other memory leak down prior to 3.0.7 release? > > Cheers, > > Bernard > -- Jesse Becker GPG Fingerprint -- BD00 7AA4 4483 AFCC 82D0 2720 0083 0931 9A2B 06A2 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Ganglia-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ganglia-developers
