2 ms·
A point of JNI - use direct byte buffers. The address remains the same within the virtual address of the process (hence non-movable). Of course that leaves som
by xxs 9y ago
A point of JNI - use direct byte buffers. The address remains the same within the virtual address of the process (hence non-movable).
Of course that leaves some memory management in Java, itself, but the price is usually fine for having void* access in C.