Skip to content
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

channels/Common.java allocates an extra ByteBuffer unnecessarily in read and write #48

Open
athanatos opened this issue Nov 10, 2017 · 3 comments

Comments

@athanatos
Copy link

As far as I can tell, jnr-ffi is fine with array-backed or direct buffers, so we can avoid the extra allocation in those cases.

@huntc
Copy link
Contributor

huntc commented Nov 24, 2017

Amazing, I was just about to raise this same issue!

@gregw
Copy link
Contributor

gregw commented Dec 7, 2017

Note also that the copy in write is implemented incorrectly for asynchronous writes, as it consumes the passed buffer even if not all of the data is written. See #50

@CAFEBABE88
Copy link

CAFEBABE88 commented May 10, 2018

will this lead to memory leak issues?
I use jnr-unixsocket as my java process IPC lib with other processes, I foud the off-heap memory consumption is very high, but I didn't allocate any direct bytebuffer in my java code.

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

4 participants