From: Charles Oliver Nutter Date: 2007-10-28T14:46:36+09:00 Subject: Re: How fast does your Ruby run? ara.t.howard wrote: > > On Oct 27, 2007, at 11:04 PM, Charles Oliver Nutter wrote: > >> Raising an error might be a better way to ensure people don't run code >> without ObjectSpace enabled, certainly. But maybe they don't care? > > they care.... why not just use autoload charles? Because ObjectSpace needs to be loaded/enabled *before* the objects you want to track come into existance. Unlike Ruby's simple GC and memory model, in JRuby we have to explicitly add objects created to a walkable list. There's no capability on most modern GCed VMs to walk the heap at will. Because of that, any objects created before ObjectSpace is enabled would not be visible during any subsequent walk. Generally, autoload would be far too late. - Charlie