blob: fea8bdf47c6f4ce5fabffeb007de9c1f7cb171cc [file] [log] [blame]
// Copyright 2019 The Fuchsia 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 memory
import (
"golang.org/x/sys/unix"
)
func total() uint64 {
memsize, err := unix.SysctlUint64("hw.memsize")
if err != nil {
return 0
}
return memsize
}