What happens when JVM runs out of memory?How does it communicate this to java Application?
An
OutOfMemoryError exception is thrown.
How much memory is allocated to JVM?
Is it same under all platforms.
It depends on the configuration that you set when you run the JVM. The
java application launcher let you set a couple of flags to control that:
-Xmsn: Specify the initial size, in bytes, of the memory allocation pool. The default value is 2MB.
-Xmxn: Specify the maximum size, in bytes, of the memory allocation pool. The default value is 64MB.
What is the priority of Garbage collector thread?
I have no idea. Can I ask why you want to know?