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

Add shm_open, shm_unlink, and mmap to Unix LibCAPI #1094

Closed
magneticflux- opened this issue May 11, 2019 · 5 comments
Closed

Add shm_open, shm_unlink, and mmap to Unix LibCAPI #1094

magneticflux- opened this issue May 11, 2019 · 5 comments

Comments

@magneticflux-
Copy link

@gkoudjou
Copy link

gkoudjou commented Jun 4, 2020

Hello,

While loading a shared library, i ran into the issue described here.

Here is the error message :

java: symbol lookup error: xxxxxx.so: undefined symbol: shm_unlink

Since, the initial post dates is one year old, is there any chance that this feature will be take into account in the coming months ?

Thanks

@magneticflux-
Copy link
Author

@gkoudjou I implemented this myself a while back here: https://github.com/magneticflux-/jvm-shared-memory

You can view the way I access each native library as an example. I forgot to license it since it was for personal use, but I'll put it under the LGPL real quick.

@dbwiddis
Copy link
Contributor

dbwiddis commented Jun 4, 2020

@magneticflux- your mapping of mmap uses a long for the offset argument. This will fail on most 32-bit Linux distros. The correct mapping should account for that argument being off_t which can be 32-bit or 64-bit. See discussion on #1202.

@gkoudjou JNA is a user-supported library. Simply asking for a feature doesn't get it, often after several years. In this case, I've happened to be working on this myself for other reasons and will submit it when the off_t discussion is resolved. We need more users to submit their mappings to the project to avoid duplication.

@magneticflux-
Copy link
Author

@dbwiddis Thanks for the heads up! I've only encountered 64-bit systems so far but I'll make sure to fix it in case it eventually gets used on a 32-bit system.

@dbwiddis
Copy link
Contributor

This can be closed as these mappings were committed in #1202

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants