synchronization in gcj
Jerry Kramskoy
Jerry.Kramskoy@isltd.insignia.com
Fri Jan 15 05:00:00 GMT 1999
-----Original Message-----
From: Archie Cobbs <archie@whistle.com>
To: tromey@cygnus.com <tromey@cygnus.com>
Cc: java-discuss@cygnus.com <java-discuss@cygnus.com>
Date: Friday, January 15, 1999 11:35 AM
Subject: Re: synchronization in gcj
>Tom Tromey writes:
>> Does the JVM really require monitorenter and monitorexit to be paired
>> in a method? I didn't see this restriction in the JVM spec, but I
>> didn't look very hard either. If you have a pointer, I'd appreciate
>> it.
>>
>> This is an important consideration because the .class reader should
>> work with any .class file, not just one that comes from Java source
>> code.
>
>I think the JVM itself doesn't require it, but the class verifier does.
>(not 100% positive though).
>
>-Archie
Of course, the real issue is that monitors get managed appropriately
especially in the presence of exceptions ... whereas the JVM spec does not
require the VM to track monitors held and automatically free them if needed,
any VM considered robust enough for embedded applications should do exactly
this, otherwise you end of resource leaks.
Jerry Kramskoy
>
>___________________________________________________________________________
>Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com
>
More information about the Java
mailing list