From f70229a1782feaf1106b071122c1e55ae0751709 Mon Sep 17 00:00:00 2001 From: DarthArgus Date: Sun, 14 Feb 2016 12:27:12 -0600 Subject: [PATCH] set metaspace size properly for java 8 and above - otherwise you'll run out of ram and crash --- .../server/library/serverScript/src/shared/JavaLibrary.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/engine/server/library/serverScript/src/shared/JavaLibrary.cpp b/engine/server/library/serverScript/src/shared/JavaLibrary.cpp index 0cbc73ac..e6c87680 100755 --- a/engine/server/library/serverScript/src/shared/JavaLibrary.cpp +++ b/engine/server/library/serverScript/src/shared/JavaLibrary.cpp @@ -1258,12 +1258,17 @@ void JavaLibrary::initializeJavaThread() // the below is ok but could use the dynamic function call too if we want someday #ifdef JNI_VERSION_1_9 vm_args.version = JNI_VERSION_1_9; + + tempOption.optionString = "-XX:MetaspaceSize=128m"; + options.push_back(tempOption); #define JAVAVERSET = 1 #endif #ifndef JAVAVERSET #ifdef JNI_VERSION_1_8 vm_args.version = JNI_VERSION_1_8; + tempOption.optionString = "-XX:MetaspaceSize=128m"; + options.push_back(tempOption); #define JAVAVERSET = 1 #endif #endif