// Copyright (c) TribuFu. All Rights Reserved. use crate::GetSystemInfo; use sysinfo::SystemExt; /// Returns the total memory of the current system. pub fn GetTotalMemory() -> u64 { GetSystemInfo().total_memory() } /// Returns the free memory of the current system. pub fn GetFreeMemory() -> u64 { GetSystemInfo().free_memory() } /// Returns the used memory of the current system. pub fn GetUsedMemory() -> u64 { GetSystemInfo().used_memory() } /// Returns the total swap of the current system. pub fn GetTotalSwap() -> u64 { GetSystemInfo().total_swap() } /// Returns the free swap of the current system. pub fn GetFreeSwap() -> u64 { GetSystemInfo().free_swap() } /// Returns the used swap of the current system. pub fn GetUsedSwap() -> u64 { GetSystemInfo().used_swap() }