------art_13147_3289796.1200405006386
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,

Here's the test output:

dewd@rubynho:~/loose/find_kill_leak$ /opt/ruby_test/bin/ruby -v found.rb
ruby 1.8.6 (2008-01-15 patchlevel 5000) [i686-linux]
dewd     26195  0.0  0.1   3068  1560 pts/1    S+   10:45   0:00  |   \_
/opt/ruby_test/bin/ruby -v found.rb
dewd     26195 10.0  0.2   3992  2456 pts/1    S+   10:45   0:00  |   \_
/opt/ruby_test/bin/ruby -v found.rb
dewd     26195 22.0  0.3   4648  3192 pts/1    R+   10:45   0:00  |   \_
/opt/ruby_test/bin/ruby -v found.rb
dewd     26195 18.0  0.3   5308  3900 pts/1    R+   10:45   0:00  |   \_
/opt/ruby_test/bin/ruby -v found.rb



For this code:

class Zico
  def whats_that
    self.class.to_s.split('::')
  end
end

re  ^\w+\s+#{Process.pid}/

print_process_memory  roc{
  lines  ps auxf`.split(/\n/)
  puts lines.find{|line| re line }
}

print_process_memory[]

o  ico.new

3.times{
  30000.times{
    o.whats_that
  }
  GC.start
  print_process_memory[]
}


Luckily Ruby 1.9 doesn't have a problem with it. :-)

Cheers,
Joao

------art_13147_3289796.1200405006386
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,<br><br>Here&#39;s the test output:<br><br>dewd@rubynho:~/loose/find_kill_leak$ /opt/ruby_test/bin/ruby -v found.rb <br>ruby 1.8.6 (2008-01-15 patchlevel 5000) [i686-linux]<br>dewd&nbsp;&nbsp;&nbsp;&nbsp; 26195&nbsp; 0.0&nbsp; 0.1&nbsp;&nbsp; 3068&nbsp; 1560 pts/1&nbsp;&nbsp;&nbsp; S+&nbsp;&nbsp; 10:45&nbsp;&nbsp; 0:00&nbsp; |&nbsp;&nbsp; \_ /opt/ruby_test/bin/ruby -v 
found.rb<br>dewd&nbsp;&nbsp;&nbsp;&nbsp; 26195 10.0&nbsp; 0.2&nbsp;&nbsp; 3992&nbsp; 2456 pts/1&nbsp;&nbsp;&nbsp; S+&nbsp;&nbsp; 10:45&nbsp;&nbsp; 0:00&nbsp; |&nbsp;&nbsp; \_ /opt/ruby_test/bin/ruby -v found.rb<br>dewd&nbsp;&nbsp;&nbsp;&nbsp; 26195 22.0&nbsp; 0.3&nbsp;&nbsp; 4648&nbsp; 3192 pts/1&nbsp;&nbsp;&nbsp; R+&nbsp;&nbsp; 10:45&nbsp;&nbsp; 0:00&nbsp; |&nbsp;&nbsp; \_ /opt/ruby_test/bin/ruby -v 
found.rb<br>dewd&nbsp;&nbsp;&nbsp;&nbsp; 26195 18.0&nbsp; 0.3&nbsp;&nbsp; 5308&nbsp; 3900 pts/1&nbsp;&nbsp;&nbsp; R+&nbsp;&nbsp; 10:45&nbsp;&nbsp; 0:00&nbsp; |&nbsp;&nbsp; \_ /opt/ruby_test/bin/ruby -v found.rb<br><br><br><br>For this code:<br><br>class Zico<br>&nbsp; def whats_that<br>&nbsp;&nbsp;&nbsp; self.class.to_s.split(&#39;::&#39;)
<br>&nbsp; end<br>end<br><br>re  ^\w+\s+#{Process.pid}/<br><br>print_process_memory  roc{<br>&nbsp; lines  ps auxf`.split(/\n/)<br>&nbsp; puts lines.find{|line| re line }<br>}<br><br>print_process_memory[]<br><br>o  ico.new<br>
<br>3.times{<br>&nbsp; 30000.times{<br>&nbsp;&nbsp;&nbsp; o.whats_that<br>&nbsp; }<br>&nbsp; GC.start<br>&nbsp; print_process_memory[]<br>}<br><br><br>Luckily Ruby 1.9 doesn&#39;t have a problem with it. :-)<br><br>Cheers,<br>Joao<br>

------art_13147_3289796.1200405006386--