From: ts Date: 2001-12-17T22:06:31+09:00 Subject: [ruby-talk:28760] Re: Constant loss of memory with Kernel::load in a loop >>>>> "n" == nobu nokada writes: n> It may be a fixed bug. No, I don't think pigeon% cat b.rb #!./ruby counter = 0 system("ps aux | head -1") while TRUE counter = counter + 1 load "loadit.rb" if (counter.modulo(1000) == 0) system("ps aux | grep b.rb | grep -v grep") end end pigeon% pigeon% cat loadit.rb def foo(x) x = x + 1 end foo(1) pigeon% pigeon% ./ruby -v ruby 1.7.2 (2001-12-17) [i686-linux] pigeon% pigeon% ./ruby b.rb USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND ts 13379 88.0 0.2 2680 1404 pts/1 S 14:01 0:03 ./ruby b.rb ts 13379 99.9 0.2 2700 1424 pts/1 S 14:01 0:07 ./ruby b.rb ts 13379 95.8 0.2 2724 1448 pts/1 S 14:01 0:10 ./ruby b.rb ts 13379 93.6 0.2 2744 1468 pts/1 S 14:01 0:14 ./ruby b.rb ts 13379 97.4 0.2 2768 1492 pts/1 S 14:01 0:17 ./ruby b.rb ts 13379 95.6 0.2 2788 1512 pts/1 S 14:01 0:21 ./ruby b.rb ts 13379 94.4 0.2 2812 1536 pts/1 S 14:01 0:24 ./ruby b.rb ts 13379 96.8 0.3 2832 1556 pts/1 S 14:01 0:28 ./ruby b.rb ./loadit.rb:5: Interrupt from b.rb:6:in `load' from b.rb:6 pigeon% and my patch is WRONG because it's more difficult to correct it, i.e. ruby need a strdup() Guy Decoux