You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Properly support non-resurrecting finalisation (Ruby ObjectSpace.define_finalizer)
Treat "zombies" like PhantomReference
We will stop using mmtk-core's Java-style reference handling. Instead we'll use the new binding-side reference/finaliser processing API.
Create "zombie" "finalisation job" when a finaliser is added
I choose not to call it "zombie" because they do not reuse the space of dead objects, and I invented my own structure that is very different to RZombie.
Execute "finalisation jobs" periodically
Execute "finalisation jobs" at exit
Properly support resurrecting finalisation (any non-trivial actions in obj_free, especially T_DATA, T_FILE and T_SYMBOL)
While working on supporting VM binding-side reference/finaliser handling, I managed to handle finalisers (ObjectSpace.define_finalizer) by traversing the finalizer_table and creating "finalisation job" (our own alternative to zombies) for dead entries. Now those finalisers can be properly executed after GC is triggered.
Task list:
ObjectSpace.define_finalizer
)Treat "zombies" likePhantomReference
We will stop using mmtk-core's Java-style reference handling. Instead we'll use the new binding-side reference/finaliser processing API.
PhantomReference
support inmmtk-core
(Done: Weak reference processing mmtk-core#564)"zombie""finalisation job" when a finaliser is addedRZombie
.obj_free
, especiallyT_DATA
,T_FILE
andT_SYMBOL
)mmtk-core
supports getting object registered for finalisation before the object dies. (Get finalizable object before object dies mmtk-core#578)We will stop using mmtk-core's Java-style reference handling. Instead we'll use the new binding-side reference/finaliser processing API. Generalise weak reference processing for other languages mmtk-core#700
Decouple theFinalization
work packet fromProcessEdgesWork
to support object enqueuing.We don't need special handling in
Finalization
. The current Java-style finalization mechanism supports Ruby well.- https://github.com/wks/mmtk-ruby/tree/gen-weakref-api
- https://github.com/wks/ruby/tree/gen-weakref-api
mmtk-core
supportProcessObjectsWork
in addition toProcessEdgesWork
.mmtk_alloc
), we run non-resurrecting finalizers (obj_free
).The text was updated successfully, but these errors were encountered: