memtracker

Andreas Ericsson ae at op5.se
Fri Dec 3 00:33:40 CET 2004


Ahoy.

I've finished the memory tracker. It tracks strdup(), malloc(), 
realloc() and free() calls, and just keeps tabs on what's used and what 
isn't.

Apply the attached patch (patch -p1), ./configure and make nagios
The output ends up in /tmp/nagios.leak

The main point is to let nagios run a couple of times through its hopps, 
force a sigsegv so it dumps core and then use the (preferrably parsed) 
leak output to find name and location of the variables that are never freed.

It's conditional to MEMLEAK_DEBUG being defined, so it can be kept 
around without affecting anything on production systems.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: nagios-memtracker.diff
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20041203/61315c45/attachment.ksh>


More information about the Developers mailing list