From: Joel VanderWerf Date: 2002-06-17T06:08:20+09:00 Subject: debugging GC Hi. I've been debugging memory problems in a ruby app lately, and I needed to know why certain objects were not collected. So I patched gc.c and memory.c to add a method to the GC module that accepts an object and returns an array of arrays, each of which represents a path from root references (stack, globals, etc.) up to (but not including) your object. It's fairly useful, but limited. Unfortunately, this functionality cannot be easily implemented as an extension, only as a patch, because hardcoded calls to rb_gc_mark are all over the place, and there is no way to customize the behavior of rb_gc_mark. Anyway, it's at: http://redshift.sourceforge.net/debugging-GC/ Hope it's useful to someone besides me...