performance impact of JNI GetCritical*

Michael Bien mbien at
Sun Mar 7 00:57:55 UTC 2010


I have a few performance/best practice related questions regarding 
heap<->C data transfers and GC implications.

How optimized are the Get/ReleasePrimitiveArrayCritical JNI functions? 
Do they disable GC or do they only pin the array at the specific address?

If they would disable the GC until release, i suppose this would have 
pretty severe impact esp for concurrent GCs.

Could you recommend best practices?
lets say I have a short java array of length 12. Should I copy it to a 
direct NIO buffer and use the buffer as vehicle, use Get/ReleaseCritical 
or something else?

best regards,

Michael Bien

hotspot-gc-use mailing list
hotspot-gc-use at

More information about the hotspot-gc-dev mailing list