17 lines
331 B
Go
17 lines
331 B
Go
package system_check
|
|
|
|
type MemoryInformation struct {
|
|
/*
|
|
* The total amount of memory the system has available
|
|
*/
|
|
SystemMemory uint64
|
|
/*
|
|
* How much memory is currently unused
|
|
*/
|
|
AvailableMemory uint64
|
|
}
|
|
|
|
func (memInfo MemoryInformation) GetUsedMemory() uint64 {
|
|
return memInfo.SystemMemory - memInfo.AvailableMemory
|
|
}
|