Cater to high ram systems

pull/54/head
Martin Wimpress 3 years ago
parent c368e7ee9e
commit 3124138e47
No known key found for this signature in database
GPG Key ID: 61DF940515E06DA3
  1. 8
      quickemu

@ -302,7 +302,13 @@ function vm_boot() {
local RAM_HOST=$(free --mega -h | grep Mem | cut -d':' -f2 | cut -d'G' -f1 | sed 's/ //g')
#Round up - https://github.com/wimpysworld/quickemu/issues/11
RAM_HOST=$(printf '%.*f\n' 0 ${RAM_HOST})
if [ ${RAM_HOST} -ge 64 ]; then
if [ ${RAM_HOST} -ge 256 ]; then
RAM_VM="32G"
elif [ ${RAM_HOST} -ge 128 ]; then
RAM_VM="16G"
elif [ ${RAM_HOST} -ge 64 ]; then
RAM_VM="8G"
elif [ ${RAM_HOST} -ge 32 ]; then
RAM_VM="4G"
elif [ ${RAM_HOST} -ge 16 ]; then
RAM_VM="3G"

Loading…
Cancel
Save