Out Of Memory (OOM): An Out of Memory error occurs due to memory exhaustion, either in java heap or native memory. In the JVM, OOM errors are thrown when the JVM cannot allocate an object because it is out of heap memory, and no more heap memory could be made available by the garbage collector.

Memory Leak: A memory leak occurs if memory is used by an application and not released by the application when it is finished with it. A memory leak can occur in either java heap or native memory, and either will eventually cause an out of memory situation.

Check if the JVM is started with the argument -XX:+UseLargePagesForCode as with this the MaxCodeMemory might be set too low with the default value. By default the option -XX:+ReserveCodeMemory is enabled on on Solaris SPARC, Windows x86_64, and Linux x86_64 platforms. When -XX:+UseLargePagesForCode is set and also ReserveCodeMemory enabled then the MaxCodeMemory is limited to 64 MB.