From: Christopher Thompson Date: 2008-07-24T01:59:32+09:00 Subject: [ruby-core:17932] Re: Object allocation tracking Joel VanderWerf wrote: > Christopher Thompson wrote: >> Please excuse the blog spam. >> >> We (Nexopia.com) just released a small patch which may be useful to >> some of you who are trying to track down memory issues with Ruby. The >> patch allows for checkpointing and dumping of all reachable objects, >> and logging of newly created objects. >> >> This is designed to give much more information than >> ObjectSpace.each_object can give. Because of the increased memory >> requirements and slower object allocation, this is inappropriate for >> most production environments. >> >> It applies against Ruby 1.8.6-p114. If you have any fixes or >> enhancements, please feel free to contact me directly or add a comment >> to the blog post. >> >> More details and the patch itself are available at: >> http://blog.nexopia.com/2008/07/17/ruby-object-allocation-tracking/ > > There's this, too, which tells you _how_ each object is reachable (does > your patch do that?), but it hasn't been updated since 2005: > > http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-talk/151854?151358-152549 My patch does not incorporate the reachability patch, though it does provide some useful information. It (should) tell you the file name and line number where the object was initially created, something the reachability patch does not. By the way, I ported the reachability patch, above, to 1.8.6-p114 patched with my object allocation tracking. I can probably make this available if anyone wants.