Closed
Bug 427030
Opened 18 years ago
Closed 17 years ago
Actionmonkey MMgc: recursive postmark hook or A => B API
Categories
(Tamarin Graveyard :: Garbage Collection (mmGC), defect)
Tracking
(Not tracked)
VERIFIED
WONTFIX
People
(Reporter: benjamin, Assigned: jorendorff)
Details
Attachments
(1 file)
|
10.24 KB,
patch
|
Details | Diff | Splinter Review |
In several (many?) places in XPCOMGC I have situations where the aliveness of an object A (XPCNativeMap) implies that one or more other objects B must stay alive.
Object B, however, is not reachable directly from object A: it is maintained in an out-of-band map of some sort.
The canonical example of this is xpconnect JS wrappers around XPCOM objects:
* the wrapper should stay alive as long as the XPCOM object
* there may be multiple wrappers per XPCOM object
* most XPCOM objects don't have wrappers, so we don't want to spend a word per-object
But the specific case I'm dealing with right now is ClassInfo2NativeSetMap in xpcmaps.h.
| Assignee | ||
Comment 1•18 years ago
|
||
Here is a very basic (potentially very very slow) implementation of an A=>B API in MMgc. The public APIs are MMgc::GC::{Link,Unlink}(void *source, void *target). A link from A to B makes the GC act as though A actually contains a pointer to B. The patch includes tests illustrating this.
API rule: Don't gc->Free(x) if any links to x might exist. (Whether this restriction makes any sense is debatable. For now it is convenient.)
Known issues: This causes GC.h to #include <map> and <utility>, which makes the SpiderMonkey build slow. It also needs comments on GC::Lock and GC::Unlock.
Assignee: nobody → jorendorff
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•18 years ago
|
||
In the last sentence of comment 1, I meant "GC::Link and GC::Unlink".
| Assignee | ||
Comment 3•17 years ago
|
||
Mass-WONTFIXing ActionMonkey bugs.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
Updated•16 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•