Issue 65: weed-fs 0.51 does not compile under windows

This commit is contained in:
Chris Lu
2014-03-28 12:18:01 -07:00
parent 59f6a13609
commit 25a3c47def
8 changed files with 58 additions and 71 deletions

View File

@@ -1,10 +1,7 @@
// +build !windows
package stats
import (
"runtime"
"syscall"
)
type MemStatus struct {
@@ -26,13 +23,6 @@ func MemStat() MemStatus {
mem.Heap = memStat.HeapAlloc
mem.Stack = memStat.StackInuse
//system memory usage
sysInfo := new(syscall.Sysinfo_t)
err := syscall.Sysinfo(sysInfo)
if err == nil {
mem.All = sysInfo.Totalram //* uint64(syscall.Getpagesize())
mem.Free = sysInfo.Freeram //* uint64(syscall.Getpagesize())
mem.Used = mem.All - mem.Free
}
mem.fillInStatus()
return mem
}