next up previous
Next: M3 passing compiler Up: SPIN Storage Management Issues Previous: C allocated untraced

M3 passing traced reference to C

Traced data being referenced by GC unsafe modules must be immobilized using the StrongRef interface. Determining when to release the strong reference is difficult. Ideally the strong reference is released by the GC unsafe code when all actual reference are dropped. However, it is intractable to determine where and when to release the strongref in all of the imported device drivers, tcp, socket, and SAL C code.

Solution

Use strong references in conjunction with treating the untraced heap as a source of ambiguous roots. Once there are no more references to the memory in the traced heap, the collector can scan the untraced heap to determine whether there are any ambiguous roots left. The collector may move the data once there are no ambiguous roots, thereby compacting the heap, or delete it if the strongref has the last outstanding reference.



Marc Fiuczynski
Thu Dec 28 15:39:17 PST 1995