Skip to content

Commit

Permalink
Parallel build logic should work against available memory, not total …
Browse files Browse the repository at this point in the history
…memory
  • Loading branch information
derekwaynecarr committed Nov 19, 2015
1 parent 47de06b commit a043f3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hack/lib/golang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -415,12 +415,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
Expand Down

0 comments on commit a043f3c

Please sign in to comment.