Bumps [github.com/KimMachineGun/automemlimit](https://github.com/KimMachineGun/automemlimit) from 0.4.0 to 0.5.0. - [Commits](https://github.com/KimMachineGun/automemlimit/compare/v0.4.0...v0.5.0) --- updated-dependencies: - dependency-name: github.com/KimMachineGun/automemlimit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
20 lines
284 B
Go
20 lines
284 B
Go
// +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
|
|
}
|