Closed
Description
Task list:
- Properly support non-resurrecting finalisation (Ruby
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)
- 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
.
- 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
- Execute "finalisation jobs" periodically
- Execute "finalisation jobs" at exit
- Properly support resurrecting finalisation (any non-trivial actions in
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 inFinalization
. 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
.
-
- Add a hook on the Ruby side. When GC triggered during heap allocation (
mmtk_alloc
), we run non-resurrecting finalizers (obj_free
).
Metadata
Metadata
Assignees
Labels
No labels