Skip Menu |

This queue is for tickets about the Sys-Statistics-Linux CPAN distribution.

Report information
The Basics
Id: 64734
Status: rejected
Priority: 0/
Queue: Sys-Statistics-Linux

People
Owner: Nobody in particular
Requestors: d8xxedhu76jbb3o [...] h.mintemail.com
Cc:
AdminCc:

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



Subject: get() method doesnt seem to release memory from previous call, leaks as hell
if running code similar to this $ps = Sys::Statistics::Linux::Processes->new; $ps->init; while (1) { $x = $ps->get(); sleep (1); } the app will consume all available mem in short time. i circumevented it by putting the object creation into the loop and calling undef($x) explicitly after sleep.
Am Do 13. Jan 2011, 02:26:14, pwnz0r schrieb: Show quoted text
> if running code similar to this > > $ps = Sys::Statistics::Linux::Processes->new; > $ps->init; > > while (1) { > $x = $ps->get(); > sleep (1); > } > > the app will consume all available mem in short time. > i circumevented it by putting the object creation into the loop and > calling undef($x) explicitly after sleep.
Sorry, but I cannot believe that. If you are really care that S::S::L consumes the memory then please try to determine what happends. If the memory of the program cosumes to much memory then dump the structrure into a logfile or use a Devel::* module to find the error. In addition you should sleep between the call of init() and get(). In your code above exists a sleep within the while() loop, but not beween init() and the first call of get().