Files
.examples
.github
alerting
client
config
controller
core
docs
jsonpath
metrics
pattern
security
storage
test
util
vendor
github.com
golang.org
google.golang.org
gopkg.in
lukechampine.com
modernc.org
cc
ccgo
v3
lib
Makefile
ccgo.go
cover.go
design-notes.adoc
dmesg.go
etc.go
go.go
init.go
mem.go
mem_linux.go
nodmesg.go
stringer.go
unconvert.sh
util.go
LICENSE
libc
mathutil
memory
opt
sqlite
strutil
token
modules.txt
watchdog
web
.dockerignore
.gitattributes
.gitignore
Dockerfile
LICENSE
Makefile
README.md
config.yaml
go.mod
go.sum
main.go
gatus/vendor/modernc.org/ccgo/v3/lib/mem_linux.go
2021-07-18 17:29:08 -04:00

21 lines
385 B
Go

// Copyright 2020 The CCGO Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ccgo // import "modernc.org/ccgo/v3/lib"
import (
"golang.org/x/sys/unix"
)
var totalRam uint64
func init() {
var si unix.Sysinfo_t
if unix.Sysinfo(&si) != nil {
return
}
totalRam = uint64(si.Totalram)
}