[kaffe] Lock patch

Timothy Stack stack at cs.utah.edu
Tue Mar 8 05:40:12 PST 2005

On Mar 8, 2005, at 5:38 AM, Helmer Krämer wrote:
> If *lkp does not point to a heavy lock, a new one is allocated on the 
> heap.

I just want to interject a little note here, which I'm not sure is even 
Basically, Pat Tullmann (i think) once observed that the maximum number
of heavy locks needed by the system was the same as the number of 
in the system.  In other words, every thread is either: running, 
blocked trying
to obtain a lock, or blocked in an Object.wait().  Therefore, you could
preallocate all of the lock objects when creating threads and not have 
try and allocate memory when taking a lock.  Of course, this may not 
anymore since y'all seem to be leaving the heavies in place.  Anyways,
there is an implementation of this in the janosvm if you're interested.

> Helmer


More information about the kaffe mailing list