From: Rasmus Grouleff <rasmus@...> Date: 2011-07-20T03:05:14+09:00 Subject: [ruby-core:38204] [Ruby 1.9 - Bug #5058][Open] Memory leak in Psych.load Issue #5058 has been reported by Rasmus Grouleff. ---------------------------------------- Bug #5058: Memory leak in Psych.load http://redmine.ruby-lang.org/issues/5058 Author: Rasmus Grouleff Status: Open Priority: Normal Assignee: Category: ext Target version: 1.9.2 ruby -v: ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.8.0] =begin I believe there's a memory leak in (({Psych.load})) that affects all long running processes that loads YAML a large number of times. The expected behaviour is that the memory consumption doesn't grow just because a very simple piece of YAML is loaded and immediately thrown away multiple times. The easiest way to reproduce it is by executing the following piece of code in irb and look at the memory consumption of the process in a process monitor. require 'psych' (1..10000).each {|i| Psych.load "---\nhey\n...\n"} The two pictures I've attached show what it looks like in my process monitor before and after. I've run this on Mac OS X 10.6.8. The compiler is: (({i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)})) And I've used no ./configure options. =end -- http://redmine.ruby-lang.org