jmavsim_run.sh: add more aggressive GC option

This reduces memory usage by roughly 100MB on my laptop
This commit is contained in:
Beat Küng 2017-10-26 15:02:20 +02:00 committed by Lorenz Meier
parent 083a59ebc0
commit 44839208f7
1 changed files with 9 additions and 1 deletions

View File

@ -43,4 +43,12 @@ fi
ant create_run_jar copy_res
cd out/production
java -Djava.ext.dirs= -jar jmavsim_run.jar $device $extra_args
java -XX:GCTimeRatio=20 -Djava.ext.dirs= -jar jmavsim_run.jar $device $extra_args
ret=$?
if [ $ret -ne 0 -a $ret -ne 130 ]; then # 130 is Ctrl-C
# if the start of java fails, it's probably because the GC option is not
# understood. Try starting without it
java -Djava.ext.dirs= -jar jmavsim_run.jar $device $extra_args
fi