I am tryiung to start a java process that requires a lot of memory. For some reason, it does not work if I specify more than 19G of RAM for the process. The free and top show that I have 23G of free memory, so I wonder why this error occurs.
total used free shared buffers cached
Mem: 24158 1047 23111 0 16 356
-/+ buffers/cache: 673 23485
Swap: 2204 0 2204
Starting the process with these jvm options:
-XX:+UseConcMarkSweepGC -server -d64 -Xms4g -Xmx22g
version:
java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)
However, if I specify 19G as Xmx it works.