The question is basically contained in the title.
Say you have an application that has reached its JVM -Xmx limit. When that application requires more memory is garbage collection forced ? (in the HotSpot JVM)
A second odd thing I can’t explain is that I currently have an application server which is ran with -Xmx=2048m, the “top” command (on linux) reports 2.7g for its process.
So how/when is an application allowed to exceed its -Xmx ?
Thanks,
Actually the normal GC is triggered when young generation is full (not the whole heap) and major GC is triggered when there is no space left in survivor space so some objects need to be migrated to old generation.