Some OutOfMemory conditions also carry an explanatory message, including an error code.
If a received OutOfMemory condition has one of these codes or messages, consulting the Diagnosis Guide might point to the origin of the error, either native or Java™ heap.
If no error message is present, the first stage is to monitor the Java and native heap usages. The Java heap usage can be monitored by using the -verbose:gc option. The native heap can be monitored using svmon.