Re: JavaMemoryModel: Memory model and finalize methods

From: David F. Bacon (dfb@watson.ibm.com)
Date: Tue Dec 14 1999 - 11:29:40 EST


> My suggestion:
>
> When a finalizer is run, it is guaranteed to see all of the writes
> to the object being finalized, but not to any other object.

how do you propose to implement this? since we never know when an object will
become garbage, and since it can be GC'd and have its finalizers run at any
time after it does become garbage, you're either architecting in a global
synchronization before any finalizer can be run, or else requiring that all
writes to objects with finalizers be treated as though they are volatile.

the latter seems unacceptable from a performance point of view. the former
isn't a problem when you are doing stop-the-world GC, but would be onerous for
incremental GC's.

but as tom points out, this will all be made moot by the elegant new semantics
in which there are 31 flavors of pointers.

david
-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:23 EDT