Enhanced Aikar's flag logic to adjust for >12GB memory

For #483
This commit is contained in:
Geoff Bourne
2020-04-11 10:41:20 -05:00
parent 7910005086
commit cd70cbcbea
3 changed files with 53 additions and 9 deletions

View File

@@ -48,3 +48,18 @@ function logn {
function log {
echo "[init] $*"
}
function normalizeMemSize {
local scale=1
case ${1,,} in
*k)
scale=1024;;
*m)
scale=1048576;;
*g)
scale=1073741824;;
esac
val=${1:0: -1}
echo $(( val * scale ))
}