Debug IRB session

R

Robert Gleeson

Hi,

Recently IRB has been leaking memory until it consumes all I have
available(8GB).
I can't figure out why - I don't use anything other than the core
classes, and the odd time classes in Standard Library. During my last
IRB session, i used the core classes as well as requiring 'time' to
utilize Time.parse()

Beforehand, it was just the core classes.

My .irbrc:

#
# == Bench
# Quickly benchmark ruby enclosed inside a block.
#
require 'benchmark'
def bench &blk
Benchmark.bm do |r|
r.report &blk
end
end

uname -a:
Linux myhost 2.6.31-ARCH #1 SMP PREEMPT Tue Nov 10 19:01:40 CET 2009
x86_64 AMD Phenom(tm) 9600 Quad-Core Processor AuthenticAMD GNU/Linux

Is there anything I can do to debug the problem so I can file a bug
report & hopefully fix the issue?
 
R

Robert Gleeson

Oops, forgot to mention my ruby version:
ruby 1.9.1p243 (2009-07-16 revision 24175) [x86_64-linux]
 
R

Roger Pack

Robert said:
Hi,

Recently IRB has been leaking memory until it consumes all I have
available(8GB).
Is there anything I can do to debug the problem so I can file a bug
report & hopefully fix the issue?

http://timetobleed.com/memprof-a-ruby-level-memory-profiler/
valgrind
come to mind.

Unfortunately that's for 1.8.7 only. I could hack you up a version of
1.9 that has something like

GC.each_object{|o|=> [filename, line]
}

if desired for profiling purposes.

-r
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,261
Messages
2,571,041
Members
48,769
Latest member
Clifft

Latest Threads

Top