Issue 65: weed-fs 0.51 does not compile under windows
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user