From fbf71245e0e34006b6dac584ba0433525ee6b330 Mon Sep 17 00:00:00 2001 From: Ranald Lam Date: Sat, 19 Sep 2020 11:44:07 +0800 Subject: [PATCH] fix: Update stack and heap size limits for Java --- cms/grading/languages/java_jdk.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cms/grading/languages/java_jdk.py b/cms/grading/languages/java_jdk.py index 73bdf34dc4..92cb654ce2 100644 --- a/cms/grading/languages/java_jdk.py +++ b/cms/grading/languages/java_jdk.py @@ -78,13 +78,15 @@ def get_evaluation_commands( if JavaJDK.USE_JAR: # executable_filename is a jar file, main is the name of # the main java class - # Lowered to 2000MB, given problem limit of 2048MB - return [["/usr/bin/java", "-Deval=true", "-Xmx2000M", "-Xss1024M", + # IOI 2020 decision by ISC: + # - Stack: 960MB + # - Heap: 1024MB + return [["/usr/bin/java", "-Deval=true", "-Xmx1024M", "-Xss960M", "-Xbatch", "-XX:+UseSerialGC", "-XX:-TieredCompilation", "-XX:CICompilerCount=1", "-cp", executable_filename, main] + args] else: unzip_command = ["/usr/bin/unzip", executable_filename] - command = ["/usr/bin/java", "-Deval=true", "-Xmx2000M", "-Xss1024M", + command = ["/usr/bin/java", "-Deval=true", "-Xmx1024M", "-Xss960M", "-Xbatch", "-XX:+UseSerialGC", "-XX:-TieredCompilation", "-XX:CICompilerCount=1", main] + args return [unzip_command, command]