Skip to content

Commit

Permalink
build: Add platform specific fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana committed Aug 16, 2016
1 parent f2bffe6 commit 4dec50b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/sys/stats_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func GetStats() (stats Stats, err error) {
return
}
stats = Stats{
TotalRAM: si.Totalram,
TotalRAM: uint64(si.Totalram),
}
return stats, nil
}
4 changes: 2 additions & 2 deletions server-rlimit-nix.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ func setMaxMemory() error {
}
// Validate if rlimit memory is set to lower
// than max cache size. Then we should use such value.
if rLimit.Cur < globalMaxCacheSize {
globalMaxCacheSize = (80 / 100) * rLimit.Cur
if uint64(rLimit.Cur) < globalMaxCacheSize {
globalMaxCacheSize = (80 / 100) * uint64(rLimit.Cur)
}

// Make sure globalMaxCacheSize is less than RAM size.
Expand Down

0 comments on commit 4dec50b

Please sign in to comment.