Skip to content

Commit

Permalink
Fix Mem.ActualFree and Mem.ActualUsed on Windows (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
monicasarbu authored and andrewkroh committed Oct 12, 2016
1 parent 286c817 commit c476970
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sigar_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,8 @@ func (self *Mem) Get() error {
self.Total = uint64(statex.ullTotalPhys)
self.Free = uint64(statex.ullAvailPhys)
self.Used = self.Total - self.Free
vtotal := uint64(statex.ullTotalVirtual)
self.ActualFree = uint64(statex.ullAvailVirtual)
self.ActualUsed = vtotal - self.ActualFree
self.ActualFree = self.Free
self.ActualUsed = self.Used

return nil
}
Expand Down

0 comments on commit c476970

Please sign in to comment.