lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


----------------------------------------
> It works exactly the same way for an incremental and a stop-the-world
> collectors. Why there would be any difference? The incremental collector
> also needs to mark live objects, and therefore it needs to know which
> references are alive.
>
> -- Roberto
>
Hi Roberto
It seems that I understand. 
The whole thing is:
"GC" is trigger on two circumstances. When VM is "paused"(interacting with C), the stack top indicates exactly what it referenced. When VM is "running"(executing instructions), the stack top indicates the last register this function used.  So on the latter circumstances, we need to use the instructions to indicate the current top.
Is it right?
-- Yuanlin