When java.lang.OutOfMemoryError is thrown because the heap is full it would be very useful to temporarily suspend the VM and run a sequence of scripts/commands to get further information about the environment and the heap. For example we could run the jmap utility and get summary information about the heap, or generate a HPROF heap dump.
This RFE is submitted to track the need for option such as -XX:OnFirstOutOfMemoryJava. The option would be like the -XX:OnError option except that it would run with the first thread throws OOME due to the heap or perm space being full.
###@###.### 2004-12-06 16:39:21 GMT