MCPcopy Index your code
hub / github.com/php/frankenphp / TotalSysMemory

Function TotalSysMemory

internal/memory/memory_linux.go:5–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import "syscall"
4
5func 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}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected