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 relevant...
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 threads
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 to
try and allocate memory when taking a lock. Of course, this may not apply
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

tim


_______________________________________________ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to