How is it decided that how much physical memory is to be allocated to java heap?
问题 I have machine with 16G RAM. I run a java application with arguments -Xms9G -Xmx9G . When I run top command I see that my java process is taking 13.8g VIRT , but only 4.6g of RES . PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 5019 root 20 0 13.8g 4.7g 18m S 0.7 30.7 3:28.39 java On running pmap command, I see that only ~3.9g of heap is present as RES , rest 5.7g is in virtual . Address Kbytes RSS Dirty Mode Mapping 0000000580000000 9452384 4074228 4074228 rw--- [ anon ] Upon