I start application with -Xmx100G. The value returned by Runtime.maxMemory is 91G. Where does the remaining memory (9G) go?
I see from other posts that the API is not 100% accurate. I would like to know more about the difference.
I set the virtual memory size by
$ulimit -a 100000000.
The command fails.
$java -Xmx99g -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.