Thu Aug 06 09:26:02 2009: Request 48490 was acted upon. Transaction: Ticket created by vassili.gorsh...@gmail.com Queue: Win32-PerfLib Subject: Memory leak in Win32::perflib Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: vassili.gorsh...@gmail.com Status: new Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=48490 >
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