mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
build: Add platform specific fixes.
This commit is contained in:
parent
f2bffe6086
commit
4dec50ba51
@ -28,7 +28,7 @@ func GetStats() (stats Stats, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
stats = Stats{
|
stats = Stats{
|
||||||
TotalRAM: si.Totalram,
|
TotalRAM: uint64(si.Totalram),
|
||||||
}
|
}
|
||||||
return stats, nil
|
return stats, nil
|
||||||
}
|
}
|
||||||
|
@ -73,8 +73,8 @@ func setMaxMemory() error {
|
|||||||
}
|
}
|
||||||
// Validate if rlimit memory is set to lower
|
// Validate if rlimit memory is set to lower
|
||||||
// than max cache size. Then we should use such value.
|
// than max cache size. Then we should use such value.
|
||||||
if rLimit.Cur < globalMaxCacheSize {
|
if uint64(rLimit.Cur) < globalMaxCacheSize {
|
||||||
globalMaxCacheSize = (80 / 100) * rLimit.Cur
|
globalMaxCacheSize = (80 / 100) * uint64(rLimit.Cur)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure globalMaxCacheSize is less than RAM size.
|
// Make sure globalMaxCacheSize is less than RAM size.
|
||||||
|
Loading…
Reference in New Issue
Block a user