Hi,
I found a memory leak when using metrics of type PM_TYPE_STRING in a
perl PMDA. I tracked the problem down to PMDA.xs:fetch_callback, which
populates atom->cp by calling strdup with the string returned from the
fetch callback. Unfortunately, the memory allocated here by strdup is
never freed.
This might be a bit of a hack, but I'm not knowledgeable enough about
XS to propose a different solution. If someone else has a better idea,
by all means, please speak up :-)
Thanks,
Jason
--
Jason Rappleye
System Administrator
NASA Advanced Supercomputing Division
NASA Ames Research Center
Moffett Field, CA 94035
perl-pmda.patch
Description: Binary data
|