2

I'm having problems loading a native library (DLL, 32-bits) on my Java application running on windows.

My application has two libraries that when loaded together, occupies almost 750M of memory together with the JVM. It's far from the 2GB limit of the 32bit system.

I am getting the message "Not enough storage is available to process this command." using JNA. But it doesn't happen all the time.

It seems that the chance to happen increases when the libraries are loaded with a certain period between them. If they are loaded consecutively, the chance to get the error decreases.

I came across this answer for the Visual Studio: Not enough storage is available to process this command in VisualStudio 2008

It seems that Visual Studio policy for memory allocation policy is to ensure more continuous address space.

I was wondering if the JVM also requires continuous address space and this is the reason why sometimes the library doesn't load.

I used the Process Explorer to look at how the memory increases, and it seems that each library increases around 250Mb.

Scarminio
  • 169
  • 1
  • 7
  • Possible duplicate of [Java: When DLLs are loaded by a ClassLoader where are they stored in memory?](https://stackoverflow.com/questions/22823317/java-when-dlls-are-loaded-by-a-classloader-where-are-they-stored-in-memory) – Daniel Widdis Sep 10 '19 at 22:08

0 Answers0