diff --git a/host/bins/cfc-0.1.0-x64.deb b/host/bins/cfc-0.1.0-x64.deb index 4cc21e4..06b0aba 100644 Binary files a/host/bins/cfc-0.1.0-x64.deb and b/host/bins/cfc-0.1.0-x64.deb differ diff --git a/host/src/pack/dpkg/etc/rc.civ b/host/src/pack/dpkg/etc/rc.civ index 06ebdc3..8da5660 100755 --- a/host/src/pack/dpkg/etc/rc.civ +++ b/host/src/pack/dpkg/etc/rc.civ @@ -25,6 +25,19 @@ then sed -i "s%/home/kylin/civ/.userdata/username.img%${HOME}/.userdata/${USER}.img%g" $HOME/.intel/.civ/penguin-peak.ini sed -i "s%/home/kylin/Android/Pictures%${HOME}/Android/Pictures%g" $HOME/.intel/.civ/penguin-peak.ini sed -i "s%/home/kylin/Android/Download%${HOME}/Android/Download%g" $HOME/.intel/.civ/penguin-peak.ini + + SYS_MEM_SIZE=`cat /proc/meminfo | grep MemTotal | grep -v grep | awk '{print $2}'` + SYS_MEM_SIZE_G=$((SYS_MEM_SIZE/1024/1024)) + # It may smaller than the real memory size since some reserved + # memory not exposed to OS. + if [ "$SYS_MEM_SIZE_G" -le "8" ]; + then + echo "Macine with ~ 8G memory loaded, allocate 3G system memory to AVM." + sed -i "s%^size=4G$%size=3G%g" $HOME/.intel/.civ/penguin-peak.ini + else + # the size=4G is the default configuration in penguin-peak.ini, do nothing. + echo "Machine with large than 8G memory loaded, do nothing." + fi fi if [ ! -d $HOME/.userdata ]