(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