This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: JNI patches
- To: mgd at swarm dot org (Marcus G. Daniels)
- Subject: Re: JNI patches
- From: Per Bothner <per at bothner dot com>
- Date: 31 Mar 2001 18:57:00 -0800
- Cc: java at gcc dot gnu dot org
- References: <rfir8zdtlt4.fsf@cathcart.sysc.pdx.edu>
mgd@swarm.org (Marcus G. Daniels) writes:
> 2. split local ref table from global ref table. The handles should be
> unique as I understand JNI. The way it is now means that someone
> can call DeleteGlobalRef on a local ref or vice-versa.
I am not convinced this is needed. Does anything in the JNI prohibit the
following implementation:
* Locals refs and global refs are the same. When either refers to an
object, the ref is just a pointer to the Java object.
* NewGlobalRef is an identify operation.
* DeleteLocalRef and DeleteGlobalRef do nothing.
I'm not seeing how a valid JNI program can not work given this
implementation. I'm assuming the conservative GC will find
both local and global references assuming it normally scans
C static and local variables. Is that not the case?
--
--Per Bothner
per@bothner.com http://www.bothner.com/~per/