commit
39149aa148
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue