Closed dbenn closed 7 months ago
This will affect any ARM system. I have also repeated the same problem on a Raspberry Pi4.
The impact is that the maximum heap memory selected ends up being smaller than it should be (1500 MB).
On M2 Mac, without the change:
bash -x VStar.sh
++ dirname VStar.sh
+ APP_DIR=.
++ uname -a
++ grep 64
+ VER='Darwin meeus-2.local 22.5.0 Darwin Kernel Version 22.5.0: Mon Apr 24 20:53:19 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T6020 arm64'
+ '[' 'Darwin meeus-2.local 22.5.0 Darwin Kernel Version 22.5.0: Mon Apr 24 20:53:19 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T6020 arm64' '!=' '' ']'
++ echo darwin22
++ grep darwin
+ '[' darwin22 '!=' '' ']'
+++ sysctl -n hw.memsize
++ perl -e 'print int(34359738368 / (1024*1024*1024) / 2);'
+ HALF_MEM=16
+ '[' 16 == '' ']'
+ '[' 16 == 0 ']'
+ MAX_MEM=16g
+ java -splash:./extlib/vstaricon.png -Xms800m -Xmx16g -jar ./dist/vstar.jar
meeus:vstar david$ bash -x VStar.sh
++ dirname VStar.sh
+ APP_DIR=.
++ uname -a
++ grep _64
+ VER=
+ '[' '' '!=' '' ']'
+ MAX_MEM=1500m
+ java -splash:./extlib/vstaricon.png -Xms800m -Xmx1500m -jar ./dist/vstar.jar
and with the change:
bash -x VStar.sh
++ dirname VStar.sh
+ APP_DIR=.
++ uname -a
++ grep 64
+ VER='Darwin meeus-2.local 22.5.0 Darwin Kernel Version 22.5.0: Mon Apr 24 20:53:19 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T6020 arm64'
+ '[' 'Darwin meeus-2.local 22.5.0 Darwin Kernel Version 22.5.0: Mon Apr 24 20:53:19 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T6020 arm64' '!=' '' ']'
++ echo darwin22
++ grep darwin
+ '[' darwin22 '!=' '' ']'
+++ sysctl -n hw.memsize
++ perl -e 'print int(34359738368 / (1024*1024*1024) / 2);'
+ HALF_MEM=16
+ '[' 16 == '' ']'
+ '[' 16 == 0 ']'
+ MAX_MEM=16g
+ java -splash:./extlib/vstaricon.png -Xms800m -Xmx16g -jar ./dist/vstar.jar
First detected on an ARM M2 Apple Silicon Mac.
The following:
needs to change to: