From: SASADA Koichi Date: 2013-03-19T18:13:45+09:00 Subject: [ruby-core:53539] Re: [ruby-trunk - Feature #8107] [patch] runtime flag to track object allocation metadata (2013/03/19 18:02), tmm1 (Aman Gupta) wrote: > I like your idea. A finalization task api provides an elegant solution for processing profiling data in a safe context. Thanks. >> * Introduce new GC related hooks (restricted to C function) >> * Mark hook >> * Free hook >> * GCed hook > > What is the difference between Free and GC hooks? Is that for obj_free vs finalized? Free hook is called each free-ed object. Hook will called with GCed object. GCed hook is called each marking. If no obj free-ed, but called only this hooks. > What about NewObj hook? Can it use the same design? Will rb_newobj_of need to call RUBY_VM_SET_FINALIZER_INTERRUPT? Ah, it is my mistake. I want to say *newobj hook*, instead of Mark hook. In fact, there are no need to defer it. -- // SASADA Koichi at atdot dot net