status-go/vendor/github.com/pbnjay/memory/memory_bsd.go

20 lines
284 B
Go
Raw Normal View History

2022-04-01 16:16:46 +00:00
// +build freebsd openbsd dragonfly netbsd
package memory
func sysTotalMemory() uint64 {
s, err := sysctlUint64("hw.physmem")
if err != nil {
return 0
}
return s
}
func sysFreeMemory() uint64 {
s, err := sysctlUint64("hw.usermem")
if err != nil {
return 0
}
return s
}