On 6/24/13, Andras Horvath <lists / ruby-forum.com> wrote:
> Dear All,
>
> I've spent the last 2 days by trying to find a working memory profiling
> solution for either 1.9.x or 2.0 that can show the memory usage by
> methods. Similar to the process time output.
>
> As I read, ruby-prof needs a patched MRI to do memory profiling. But
> I couldn't set it up like this:
>
> rvm install 1.9.3-p125 --patch gcdata --name gcdata
> gem-ruby-1.9.3-p125-gcdata install ruby-prof
>
> require "ruby-prof"
>
> RubyProf.measure_mode = RubyProf::MEMORY
> RubyProf.start
>         # code to profile
>         10000.times { "hello".chars.to_a.shuffle.join }
> r = RubyProf.stop
> RubyProf::FlatPrinter.new(r).print

What doesn't work about it?