DockerToolbox 1.12.3 on Windows. My image contains java app. When I allocate JVM heap as
-Xms1g -Xmx2g then the app starts properly, but can not use memory more than 1G. If I start the app with settings ‘-Xms2g -Xmx2g’ then the app cannot even start throwing error:
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000084000000, 2080374784, 0) failed; error='Cannot allocate memory' (errno=12) # # There is insufficient memory for the Java Runtime Environment to continue. # Native memory allocation (mmap) failed to map 2080374784 bytes for committing reserved memory.
I do have more than 4G free mem on the host.
How can I solve this issue?