views:

81

answers:

1

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.
+1  A: 

Is this the same as http://stackoverflow.com/questions/1463868/java-runtime-maxmemory-incorrect?

Sam Day
This should be a comment, not an answer.
Mark Peters
Oops. Pardon a Stackoverflow newbie :)
Sam Day