------ 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'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 26195 0.0 0.1 3068 1560 pts/1 S+ 10:45 0:00 | \_ /opt/ruby_test/bin/ruby -v
found.rb<br>dewd 26195 10.0 0.2 3992 2456 pts/1 S+ 10:45 0:00 | \_ /opt/ruby_test/bin/ruby -v found.rb<br>dewd 26195 22.0 0.3 4648 3192 pts/1 R+ 10:45 0:00 | \_ /opt/ruby_test/bin/ruby -v
found.rb<br>dewd 26195 18.0 0.3 5308 3900 pts/1 R+ 10:45 0:00 | \_ /opt/ruby_test/bin/ruby -v found.rb<br><br><br><br>For this code:<br><br>class Zico<br> def whats_that<br> self.class.to_s.split('::')
<br> end<br>end<br><br>re ^\w+\s+#{Process.pid}/<br><br>print_process_memory roc{<br> lines ps auxf`.split(/\n/)<br> puts lines.find{|line| re line }<br>}<br><br>print_process_memory[]<br><br>o ico.new<br>
<br>3.times{<br> 30000.times{<br> o.whats_that<br> }<br> GC.start<br> print_process_memory[]<br>}<br><br><br>Luckily Ruby 1.9 doesn't have a problem with it. :-)<br><br>Cheers,<br>Joao<br>
------ art_13147_3289796.1200405006386--