JNI patches

Boehm, Hans hans_boehm@hp.com
Mon Apr 2 11:40:00 GMT 2001


The collector normally does not scan objects allocated with C malloc (except
on one or two platforms where that's hard to avoid). The easiest way to
change that is to redirect the C malloc to GC_malloc_uncollectable, but that
sometimes creates startup ordering issues. It should work on Linux, but I'm
not sure about various other platforms. It may not always have the
performance characteristics you want, either.
I would seriously consider this option if JNI performance becomes a
bottleneck. (Perhaps this should be another build-time option?) Otherwise
it seems safer to fix the current implementation.
Hans
> -----Original Message-----
> From: Per Bothner [ mailto:per@bothner.com ]
>> 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/
>


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /