1


I am running a java application with -Xms120g -Xmx120g on Mac laptop with 16GB of memory. What I saw was that the application was running and it consumed uptil now 36 GB of memory. I am guessing the Mac OS is using virtual memory to meet the demands of the application. However, I was wondering if I set a value of -Xms to something that the machine can't possibly provide will the application crash immediately or will it run and then only crash when it actually uses all the memory that the system can provide.

Code Junkie
  • 1,429
  • 2
  • 10
  • 9

1 Answers1

2

Found an explaination here: Why am I able to set -Xmx to a value greater than physical and virtual memory on the machine on both Windows and Solaris?

So it works to excede the available virtual memory but eventually the metadata needed to handle the heap will need to much memory and it crashes.

Community
  • 1
  • 1