From: Martin Kahlert Date: 2001-12-17T22:04:07+09:00 Subject: [ruby-talk:28759] Re: Constant loss of memory with Kernel::load in a loop Hi Jens! On Mon, Dec 17, 2001 at 08:36:48PM +0900, Jens Nissen wrote: > You can reduce "loadit.rb" to something like > > # loadit.rb > # endof loadit.rb > > and the problem remains the same. > It has to be something with the actual representation of the loaded program > in memory. > If there is no such file to load, the problem does not appear: > > # demo-no.rb tries to load non-existing file "noload.rb" > counter = 0 > while TRUE > begin > counter = counter + 1 > puts "Round #{counter}" if (counter.modulo(100) == 0) > GC.start if (counter.modulo(500) == 0) > load "noload.rb" > rescue Exception > retry > end > end > # end of demo-no.rb Seems to be not Windows related. This version leaks on Linux, too (1.6.5) Hope that helps, Martin. -- The early bird catches the worm. If you want something else for breakfast, get up later.