Merge pull request #17330 from derekwaynecarr/free_mem

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot 2015-11-24 03:42:27 -08:00
commit 0dbadda69e

View File

@ -416,12 +416,12 @@ kube::golang::build_binaries_for_platform() {
done
}
# Return approximate physical memory in gigabytes.
# Return approximate physical memory available in gigabytes.
kube::golang::get_physmem() {
local mem
# Linux, in kb
if mem=$(grep MemTotal /proc/meminfo | awk '{ print $2 }'); then
if mem=$(grep MemAvailable /proc/meminfo | awk '{ print $2 }'); then
echo $(( ${mem} / 1048576 ))
return
fi