Closed Bug 604333 Opened 14 years ago Closed 6 years ago

Clean up finalization

Categories

(Tamarin Graveyard :: Garbage Collection (mmGC), defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX
Q1 12 - Brannan

People

(Reporter: lhansen, Unassigned)

References

Details

(Whiteboard: Tracking)

There are several problems here. Right now the finalization pass in the GC scans the entire heap and calls the destructor on anything that has a destructor. Since we use reference counted objects extensively, many destructors are called. The scan and the destructor calling can take a long time and are the main cause of visible/audible pauses in the Flash Player. When reference counting is removed there will be many fewer objects that has interesting destructors, and we need a scheme (header bits, segregated allocation, change in base classes?) that allows us to scan only the ones that do have finalizers. Doing that should get rid of the finalization problem in most cases. The other problem is reference counting semantics: right now an object is finalized as it is destructed, but that means that if two objects are eligible for GC at the same time they will be finalized and destructed in some order. No fixed order is correct if one references the other and needs to access the other during its own finalization. Ergo finalization - which should be a limited activity for a few types - needs to be decoupled from destruction. There are many existing approaches to that (ephemerons, guardians, will executors, reference queues) and we may need solutions for both AS3 and C++. If we find a good finalization mechanism for C++ we may no longer need the presweep callback, and that will probably simplify the GC a bit and remove some corner cases.
Depends on: 581016
Depends on: 592355
Depends on: 514488
Depends on: 516379
Assignee: lhansen → nobody
Status: ASSIGNED → NEW
Blocks: 627025
No longer blocks: 516156
Priority: -- → P3
Target Milestone: Future → Q1 12 - Brannan
Depends on: 643371
Depends on: 643375
Depends on: 647229
Depends on: 656942
Depends on: 657949
Depends on: 658564
Flags: flashplayer-qrb+
Tamarin is a dead project now. Mass WONTFIX.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Tamarin isn't maintained anymore. WONTFIX remaining bugs.
You need to log in before you can comment on or make changes to this bug.