We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, This might be a noob question. Can I use ByteArrays and ByteBuffers that are not allocateDirect with JNR?
Something like:
Java code
fun MyFunction( src: ByteArray, srcSize: Int ): Int fun MyFunction( src: ByteBuffer, srcSize: Int ): Int
C code
int MyFunction(const char* src, int srcSize);
As far as I am aware, if I do ByteBuffer.allocate(size) the underlying memory resides in the heap and can be moved around during GC compactation.
ByteBuffer.allocate(size)
Could this lead to a segfault when using the memory in C? Does JNR protect against this?
Thanks
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
This might be a noob question. Can I use ByteArrays and ByteBuffers that are not allocateDirect with JNR?
Something like:
Java code
C code
As far as I am aware, if I do
ByteBuffer.allocate(size)
the underlying memory resides in the heap and can be moved around during GC compactation.Could this lead to a segfault when using the memory in C? Does JNR protect against this?
Thanks
The text was updated successfully, but these errors were encountered: