Merge pull request #646 from tonistiigi/32bit

gc: fix build on 32bit
docker-18.09
Tõnis Tiigi 2018-09-26 10:23:12 -07:00 committed by GitHub
commit 39149aa148
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ func detectDefaultGCCap(root string) int64 {
if err := syscall.Statfs(root, &st); err != nil {
return defaultCap
}
diskSize := st.Bsize * int64(st.Blocks)
diskSize := int64(st.Bsize) * int64(st.Blocks)
avail := diskSize / 10
return (avail/(1<<30) + 1) * 1e9 // round up
}