Skip to content

Improve JNI String marshalling #126

New issue

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

Closed
atanasovg opened this issue Jun 18, 2015 · 0 comments
Closed

Improve JNI String marshalling #126

atanasovg opened this issue Jun 18, 2015 · 0 comments
Milestone

Comments

@atanasovg
Copy link
Contributor

Currently jstring values are translated to UTF-8 encoding using JNI.GetStringUTFChars, which makes a copy of the string and allocates new memory for it each time. Instead, we may use the JNI.GetStringUTFRegion method and provide a statically allocated buffer to save extensive (and expensive) memory allocation.

@atanasovg atanasovg added this to the 1.2.0 milestone Jun 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant