# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 1027080192 bytes for committing reserved memory.
# Possible reasons:
# The system is out of physical RAM or swap space
# In 32 bit mode, the process size limit was hit
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Use 64 bit Java on a 64 bit OS
# Decrease Java heap size (-Xmx/-Xms)
# Decrease number of Java threads
# Decrease Java thread stack sizes (-Xss)
# Set larger code cache with -XX:ReservedCodeCacheSize=
# This output file may be truncated or incomplete.
#
# Out of Memory Error (os_linux.cpp:2638), pid=16699, tid=0x00007f4336af2700
#
# JRE version: OpenJDK Runtime Environment (8.0_111-b15) (build 1.8.0_111-b15)
# Java VM: OpenJDK 64-Bit Server VM (25.111-b15 mixed mode linux-amd64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
https://github.com/RaiMan/SikuliX-2014/issues/77
I'm not sure if this is related to: http://stackoverflow.com/a/23946036
I also found this post on Facebook that was interesting:
public class JavaMemory { private final int dataSize = (int) (Runtime.getRuntime().maxMemory() * 0.6); public void f() { { System.out.println(dataSize); byte[] data = new byte[dataSize]; } // Gives an error if you comment this loop for (int i = 0; i < 10; i++) { System.out.println("Please be so kind and release memory"); } System.out.println(dataSize); byte[] data2 = new byte[dataSize]; } public static void main(String[] args) { JavaMemory jmp = new JavaMemory(); jmp.f(); } }