Browse Source

jmavsim_run.sh: add more aggressive GC option

This reduces memory usage by roughly 100MB on my laptop
sbg
Beat Küng 7 years ago committed by Lorenz Meier
parent
commit
44839208f7
  1. 10
      Tools/jmavsim_run.sh

10
Tools/jmavsim_run.sh

@ -43,4 +43,12 @@ fi @@ -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

Loading…
Cancel
Save