Cannot start: insufficient memory with -Xmx30G

I get the error "Cannot start: not enough memory" when I run my code using "java -Xmx30G ExampleCode".

This error does not occur when I do not specify the size of the java virtual machine. Does anyone know why I get this error message when I set the size of a virtual machine? If -Xmx is less than 1G, then it starts, if not, then I received the error message indicated.

Thanks in advance for your help!

And yes, enough RAM :) (72G available).

BTW, JavaHome - / opt / jre1.6.0_20

+3
source share
4 answers

, . , 32- ~ 2 , 4 . , JVM, (.. 64- , , 64- JVM)

+4

, 64- JVM. , 32- 4 .

+1

You need 64bit jvm to use more than 2 / 3bb (depends on os version).

+1
source

Source: https://habr.com/ru/post/1775193/


All Articles