This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Hash locks and pointer-free allocation


I don't think that hash synchronization is neccessarily a prerequisite 
for having pointer free objects specially allocated.

Firstly, no Java object is ever _really_ pointer-free, because of the 
class descriptor (vtable) pointer. I suppose the GC assumes that pointer 
free classes themselves are never GC-allocated? Thats no problem for 
things like primitive arrays (and perhaps all native classes), but not 
marking the vtable will prevent Class GC for classes loaded from 
bytecode with a custom classloader.

Even without hash synchronization we can still have pointer free 
allocation provided the "fat" synchronization info data is allocated as 
uncollectable. We can free them using finalizer chaining on the monitor. 
I don't think this would be much of a performance hit because "fat" 
locks would only occur for contended monitors and they are very rare.

regards

Bryce.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]