Re: JavaMemoryModel: Class initialization safety is hard

From: Joel Jones (
Date: Fri Jul 09 1999 - 19:16:04 EDT

At 5:15 PM -0500 7/9/99, Paul Haahr wrote:
>On the other hand, I suspect it's possible to determine that the Class
>object is fully initialized without doing any memory barriers. (We can
>all imagine variants of the double-check idiom which get there.)

Couldn't this be done by having per-thread (or per processor) state for use
by each classes constructors? Then you could do an expensive check once
per class/ per thread (or processor) that the class has been initialized,
then an inexpensive check from then on.

(or is this what the double-check idiom is?)

Joel Jones

This is the JavaMemoryModel mailing list, managed by Majordomo 1.94.4.

To send a message to the list, email
To send a request to the list, email and put
your request in the body of the message (use the request "help" for help).
For more information, visit

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