Out of Memory!
Ooops. Okay, something in my perl program is retaining memory. I'm pumping about a Gigabyte of data though it and sooner or later it barfs as it exhausts all the memory on the machine. Something is retaining data between each chunk that's read in and spit out and BLAM, there the damn thing dies. I can't see what it is (and I've looked about, checked for obvious things) Has anyone got any ideas what I could do to determine what's taking up all the space? Later. Mark. -- s'' Mark Fowler London.pm Bath.pm http://www.twoshortplanks.com/ [EMAIL PROTECTED] ';use Term'Cap;$t=Tgetent Term'Cap{};print$t-Tputs(cl);for$w(split/ +/ ){for(0..30){$|=print$t-Tgoto(cm,$_,$y). $w;select$k,$k,$k,.03}$y+=2}
Re: Out of Memory!
Mark Fowler [EMAIL PROTECTED] writes: Ooops. Okay, something in my perl program is retaining memory. I'm pumping about a Gigabyte of data though it and sooner or later it barfs as it exhausts all the memory on the machine. Something is retaining data between each chunk that's read in and spit out and BLAM, there the damn thing dies. I can't see what it is (and I've looked about, checked for obvious things) Has anyone got any ideas what I could do to determine what's taking up all the space? There are some excellent hints on tracking memory usage in the mod_perl guide: http://perl.apache.org/guide/ -- Dave Hodgkinson, Wizard for Hire http://www.davehodgkinson.com Editor-in-chief, The Highway Starhttp://www.thehighwaystar.com Interim Technical Director, Web Architecture Consultant for hire
Re: Out of Memory!
On Fri, May 10, 2002 at 02:35:40PM +0100, Mark Fowler wrote: I can't see what it is (and I've looked about, checked for obvious things) localising an element of a tied hash leaks in all perls other than blead... various things do this behind the scenes, such as DBI ... I ran into this with Class::DBI where it did a local $sth-{TAINT} = 0 One to look out for ... Tony
Re: Out of Memory!
On 10/05/02 14:35 +0100, Mark Fowler wrote: Ooops. Okay, something in my perl program is retaining memory. I'm pumping about a Gigabyte of data though it and sooner or later it barfs as it exhausts all the memory on the machine. Something is retaining data between each chunk that's read in and spit out and BLAM, there the damn thing dies. I can't see what it is (and I've looked about, checked for obvious things) Has anyone got any ideas what I could do to determine what's taking up all the space? Okay, well, this was inspired by talking to you down the pub earlier, but I thought all of london.pm might have input / find this useful. I've been digging around the Devel:: modules on CPAN, and have turned up Devel::Leak, and Devel::ObjectTracker, both of which claim to keep track of created objects, arrays, hashes and globs, and flag which ones aren't being destroyed. Devel::Leak looks simpler (in a good way) from a cursory skim of the docs. I haven't tried them, having nothing specific to try them on, but they might be worth a look. I was wittering on about being sure there was a Devel::MemProf earlier, but it appears to have been a figment of my addled imagination...