pcp
[Top] [All Lists]

memory leak in PCP::PMDA

To: <pcp@xxxxxxxxxxx>
Subject: memory leak in PCP::PMDA
From: Jason Rappleye <jason.rappleye@xxxxxxxx>
Date: Fri, 30 Jul 2010 15:55:43 -0700

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

Attachment: perl-pmda.patch
Description: Binary data








<Prev in Thread] Current Thread [Next in Thread>
  • memory leak in PCP::PMDA, Jason Rappleye <=