\'OutOfMemoryError\': Usually, this error is thrown when there is insufficient space to allocate an object in the Java heap.
GC (Allocation Failure): Allocation Fail
In general, an OutOfMemoryError
occurs when you have exceeded the maximum memory you have already allocated to the JVM. This amount can be changed when starting java using jvm parameters. e.g. -Xmx2G
. Note that this amount isn't used immediately. See below.
GC (Allocation Failure) is similar, except it occurs when the garbage collector runs out of memory on the heap, and it attempts to allocate more. If your allocated memory is higher than your available system memory, this will fail. Essentially, the JVM tries to allocate memory which isn't there.
See for more information