Closed
Bug 624838
Opened 15 years ago
Closed 15 years ago
We need an "Unsafe" GCObject list
Categories
(Tamarin Graveyard :: Virtual Machine, defect)
Tamarin Graveyard
Virtual Machine
Tracking
(Not tracked)
VERIFIED
WONTFIX
People
(Reporter: stejohns, Assigned: stejohns)
Details
Attachments
(1 file)
4.78 KB,
patch
|
lhansen
:
superreview-
|
Details | Diff | Splinter Review |
There are a few degenerate cases in Flash/AIR that seem to need an unsafe list of GCObjects: that is, a list that deliberately does not prevent the object from being collected, but without using WeakRef. Rather than force them to invent their own, let's provide our own minimal tool for this, so we may be able to at least add debug sniffing for problems.
Assignee | ||
Comment 1•15 years ago
|
||
Holding my nose at the necessity of this, but oh well...
Assignee: nobody → stejohns
Attachment #502920 -
Flags: superreview?(lhansen)
Attachment #502920 -
Flags: review?(treilly)
Comment 2•15 years ago
|
||
How does this fit in with the notion of 'handles' that Tommy is working on (bug 623284)?
Comment 3•15 years ago
|
||
Comment on attachment 502920 [details] [diff] [review]
Patch
In general I'm utterly opposed to this, and the correct fix would seem to be to make weakrefs cheaper. If weakrefs are too expensive then let's figure out why, and whether something can be done about it. Just because a hack works does not mean it's a good idea, or (shudder) that it should be codified.
Attachment #502920 -
Flags: superreview?(lhansen) → superreview-
Assignee | ||
Comment 4•15 years ago
|
||
After offline discussion, withdrawing this bug -- there is a short-term need for something like this in Flash, but we don't want to enshrine it in Tamarin, so we'll put the relevant code directly into Flash.
Assignee | ||
Updated•15 years ago
|
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
Assignee | ||
Updated•15 years ago
|
Attachment #502920 -
Flags: review?(treilly)
Comment 5•14 years ago
|
||
If this list data structure has to exist it it should exist in the vm and not be hidden away in the player where we'll forget about it and probably have to eradicate it painfully later. We should own all memory management data structures.
The natural solution for this is to have a linked list of all objects of a class embedded in the class itself but we can't do that because our scanner will traverse that list and none of these things will be collected.
I wouldn't call this a degenerate case, putting all the instances of "foo" in a list that I can iterate in order later seems pretty normal to me.
Besides making weak refs cheaper the other solution here is to employ exact tracing of these objects, use a linked list and have the exact tracer ignore the linked list fields.
For information purposes the linked list with GCHiddenPointer fields solution was rejected because we want GCHiddenPointer to die.
Comment 6•14 years ago
|
||
I really, really do not want to own this API. If the functionality must exist in MMgc then it needs to be supported through something meaningful, like weak refs, not an ad-hoc solution that is (im)morally equivalent to GCHiddenPointer.
(Generally, I have no ambition for MMgc to "own" all the memory management.)
Comment 7•14 years ago
|
||
We could just have the player use the WeakList abstraction and since we own it we can optimize it if we need to, the list could be clever and use unscanned memory for the storage and hook into presweep to clean it up.
Assignee | ||
Comment 8•14 years ago
|
||
FWIW, I don't think using "real" WeakRefs was ever fully explored; it was asserted by the original author (without proof, afaik) that using WeakRefs would be "too slow".
You need to log in
before you can comment on or make changes to this bug.
Description
•