Oct 312022

Good day, hackfolk. Today we continue the series on garbage collection
with some notes on ephemerons and finalizers.conjunctions and disjunctionsFirst described in a 1997 paper by Barry
Hayes, which
attributes the invention to George Bosworth, ephemerons are a kind of
weak key-value association.Thinking about the problem abstractly, consider that the garbage
collector’s job is to keep live objects and recycle memory for dead
objects, making that memory available for future allocations. Formally
speaking, we can say:An object is live if it is in the root setAn object is live it is referenced by any live object.This circular definition uses the word any, indicating a disjunction:
a single incoming reference from a live object is sufficient to mark a
referent object as live.Ephemerons augment this definition…

External feed Read More at the Source: https://wingolog.org/archives/2022/10/31/ephemerons-and-finalizers


Sorry, the comment form is closed at this time.