NewDirectByteBuffer() & java.nio.ByteBuffer
Hi All,
I'm developing an application which uses the JNI interface to embed the
JVM to a C application. So my problem is, I would like to "map" some C struct
in the Java VM and that isn't a problem currently since I use the NewDirectByteBuffer()
JNI call to allocate a ByteBuffer for a given address.
My problem cames whenever I need to change the address for the mapped
objects in the Java VM because, for some reasons, the pointer has been changed in the C heap.
So instead to allocate yet another DirectByteBuffer I
would like to change only the address and nothing else. Furthermore the
object address in the C heap may change hundres of times per seconds,
so allocating and destroying ByteBuffers at this rate wouldn't be really nice.
Does anyone have some tips to suggest?
Thanks in advance.

