Current Status

Godmar Back gback@cs.utah.edu
Thu Feb 18 11:21:00 GMT 1999


> 
> > In reality, this wouldn't
> > add any to the storage requirements, because all Java objects currently
> > contain a `vtable' and `sync_info' in their object header.
> 
> But you still need the sync_info somewhere.
> 

Apropos sync_info.  EF has gone public since the last discussion on this
topic on this list.  While I don't have hard numbers, I think that their 
way of doing synchronization is the best I've seen so far.

The basic idea is that they spent an additional word per object, but 
unlike gcj/kaffe, they spend 30 bits of it to store an object's hashcode
(Kaffe uses the address of an object, which doesn't work with a moving 
collector - what does gcj/libjava do?), and they spend 2 bits to indicate
that an object is locked/that the lock is contended.  This optimizes
the common case of taking an uncontended lock.

	- Godmar



More information about the Java mailing list