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

Cleaner thread too slow #1535

Open
pmconrad opened this issue Aug 3, 2023 · 0 comments · May be fixed by #1536
Open

Cleaner thread too slow #1535

pmconrad opened this issue Aug 3, 2023 · 0 comments · May be fixed by #1536

Comments

@pmconrad
Copy link

pmconrad commented Aug 3, 2023

  1. Version of JNA and related jars. 5.13.0
  2. Version and vendor of the java virtual machine: openjdk-17.0.8.0 and others
  3. Operating system: Linux (Debian, OpenSUSE)
  4. System architecture (CPU type, bitness of the JVM), x86_64
  5. Complete description of the problem:
    I have an application that will sporadically run into a situation where multiple threads are creating lots of short-lived jna.Structure and jna.Union objects. The problem is that jna's single Cleaner thread cannot keep up freeing objects created by multiple parallel threads, so eventually all heap memory will be used up despite the fact that it could be GC'ed.
  6. Steps to reproduce:
    See test case.
@pmconrad pmconrad linked a pull request Aug 3, 2023 that will close this issue
matthiasblaesing pushed a commit to matthiasblaesing/jna that referenced this issue Sep 28, 2023
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

Successfully merging a pull request may close this issue.

1 participant