Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!bionet!arisia!roo!mark From: mark@parc.xerox.com (Mark Weiser) Newsgroups: comp.object Subject: Re: Stash Collection Message-ID: <644@roo.UUCP> Date: 29 Nov 90 07:22:57 GMT References: <2849@esquire.dpw.com> <1990Nov27.074534.17744@Think.COM> Sender: news@parc.xerox.com Lines: 18 I came in on the middle of this, but perhaps the following comment is relevent: Some systems have the notion of "finalizable" objects. These are objects for which the user desires one last shot at them before they are collected. Typically this is done by registering with the collector a "finalization routine" which is called when the collector can find no other references to the object (Naturally this call is made in a separate thread so the collector is not blocked for this). Finalization requires some form of weak link, usually, which is flippped to strong during finalization so that the object is not fully collected until the final link goes away. The Cedar and PCedar systems both offer a finalization service. Cedar uses a ref-counted GC, and the weak links are simulated by telling the GC that it should try to collect a finalizable object when the ref count is some specified non-zero value. PCedar uses a Boehm generational conservative parallel collector, and simulated weak links with "disguised" pointers (which are known to the GC). A key use of finalization in these systems is to clean up after a file descripter which has been passed around asynchronously among many threads. It is closed by the finalization routine after the last reference is dropped. -mark -- Spoken: Mark Weiser ARPA: weiser@xerox.com Phone: +1-415-494-4406