Duplicate :
|
Many JVM crashes reported by customers have been traced down to running the machine out of swap space or available address space. One type of failure that can easily and should be fixed is the situation where os::malloc() is about to return NULL. There are many code paths through the JVM (handle allocation being one recently encountered) which call malloc() and expect a non-NULL result, and if malloc() fails for any reason the JVM will crash at a random point. We should at least add code to os::malloc() to check for a NULL return value and call vm_exit_out_of_memory() or similar to produce an error log indicating the cause of the crash. 6223676 is a recent occurrence of this problem. It is probably related to 4719004 but is not exactly the same. ###@###.### 2005-2-19 02:30:54 GMT