When running a command like:
$ javac -J-Xmx1072M ...
everything works fine.
When running the same command with larger memory:
$ javac -J-Xmx2048M ...
I get the following error:
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
However, I do not understand why, because when I run systeminfo
in my windows command prompt, I get this info:
Total Physical Memory: 16,315 MB
Available Physical Memory: 6,351 MB
Virtual Memory: Max Size: 32,187 MB
Virtual Memory: Available: 13,666 MB
Virtual Memory: In Use: 18,521 MB
Meaning, I have plenty of physical memory left over.
What seems to be the issue?