synchronization in gcj

Tom Tromey tromey@cygnus.com
Thu Jan 14 21:07:00 GMT 1999


>>>>> "Godmar" == Godmar Back <gback@cs.utah.edu> writes:

Godmar> gcj uses an extra word to store a ptr to the lock associated
Godmar> with an object.
Godmar> My question is then: what was your rationale, and have you
Godmar> considered making the additional storage requirement optional
Godmar> so that users can decide that space-time trade-off for
Godmar> themselves.
I wrote this code. My rationale was that it was easy to understand
and implement. I am definitely aware of the alternatives, and I've
occasionally considered making this configurable. In fact, the
runtime side of locking was written with the expectation that we'd
want to change the representation at some later date.
On the compiler side this basically amounts to getting rid of the
extra field in the object. I believe the compiler doesn't ever
directly reference this field.
On the runtime side a bit more work is required, but not very much.
However, I'm afraid this won't get to the top of my to-do list in the
forseeable future, unless something changes.
Tom


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /