()
| 3 | import "syscall" |
| 4 | |
| 5 | func TotalSysMemory() uint64 { |
| 6 | sysInfo := &syscall.Sysinfo_t{} |
| 7 | err := syscall.Sysinfo(sysInfo) |
| 8 | if err != nil { |
| 9 | return 0 |
| 10 | } |
| 11 | |
| 12 | return uint64(sysInfo.Totalram) * uint64(sysInfo.Unit) |
| 13 | } |
no outgoing calls
no test coverage detected