Add memory support to iOS

This commit is contained in:
Dylan 2016-05-07 21:14:46 +10:00
parent 928ffa1cf2
commit ae4573066d

View file

@ -1232,7 +1232,7 @@ getmemory () {
memtotal=$((mem[0] / 1024))
;;
"Mac OS X")
"Mac OS X" | "iPhone OS")
memtotal=$(printf "%s\n" "$(sysctl -n hw.memsize)"/1024^2 | bc)
memwired=$(vm_stat | awk '/wired/ { print $4 }')
memactive=$(vm_stat | awk '/active / { printf $3 }')
@ -1240,10 +1240,6 @@ getmemory () {
memused=$(((${memwired//.} + ${memactive//.} + ${memcompressed//.}) * 4 / 1024))
;;
"iPhone OS")
memtotal=$(printf "%s\n" "$(sysctl -n hw.memsize)"/1024^2 | bc)
;;
"OpenBSD" | "BSD")
case "$distro" in
"OpenBSD"*)