Skip Menu |

This queue is for tickets about the Win32-PerfLib CPAN distribution.

Report information
The Basics
Id: 48490
Status: new
Priority: 0/
Queue: Win32-PerfLib

People
Owner: Nobody in particular
Requestors: vassili.gorshkov [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Memory leak in Win32::perflib
Date: Thu, 6 Aug 2009 09:18:08 -0400
To: bug-Win32-PerfLib [...] rt.cpan.org
From: Vassili Gorshkov <vassili.gorshkov [...] gmail.com>
Hi, We have run into a memory leaks when accessing performance counters using Win32::perflib library. Interestingly enough the memory leak only occurs when getting network counters. The following small test case demonstrates the problem: use Win32::PerfLib; my $perflib = new Win32::PerfLib(""); my $obj = 510; # 230 - proc stat and 510 - network stat while(1) { my $proc_ref = {}; $perflib->GetObjectList($obj, $proc_ref); $perflib->Close($proc_ref)); } The test case above leaks 100KB/s. Note that if you change $obj from 510 (network) to 230 (process), the leak goes away. We are running active perl version 5.10.0 built for MSWin32-x86-multi-thread (with 5 registered patches). OS: Windows XP Professional. Thanks, Vassili