Forum Stats

  • 3,728,089 Users
  • 2,245,543 Discussions
  • 7,853,322 Comments

Discussions

JNI alignment requirements

[The JNI sub-space seems to be gone, but please direct me to a more appropriate space if one exists.]

My question is: what are the alignment requirements for native buffers passed into calls of SetDoubleArrayRegion (and similar JNI calls). I want to pass in data that is not 64bit aligned. Experiments show that the current implementation can indeed deal with unaligned data, but I could not find any explicit specification around this. Both the Android implementation and the hotspot VM use memcpy to copy the data from the buffer, so it can also deal with unaligned data.

Any information would be appreciated!

Thanks!

Stephan

This discussion has been closed.