Files
DevToolsAvalonia/常用工具集/Utility/CZGL.SystemInfo/Memory/Sysinfo.cs
2025-08-26 08:37:44 +08:00

75 lines
1.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System.Runtime.InteropServices;
namespace CZGL.SystemInfo
{
/// <summary>
///
/// </summary>
public struct Sysinfo
{
/// <summary>
/// Seconds since boot
/// </summary>
public long uptime;
/// <summary>
/// 获取 1515 分钟内存的平均使用量,数组大小为 3
/// </summary>
unsafe public fixed ulong loads[3];
/// <summary>
/// 总物理内存
/// </summary>
public ulong totalram;
/// <summary>
/// 可用内存
/// </summary>
public ulong freeram;
/// <summary>
/// 共享内存
/// </summary>
public ulong sharedram;
/// <summary>
/// Memory used by buffers
/// </summary>
public ulong bufferram;
/// <summary>
/// Total swap space size
/// </summary>
public ulong totalswap;
/// <summary>
/// swap space still available
/// </summary>
public ulong freeswap;
/// <summary>
/// Number of current processes
/// </summary>
public ushort procs;
/// <summary>
/// Total high memory size
/// </summary>
public ulong totalhigh;
/// <summary>
/// Available high memory size
/// </summary>
public ulong freehigh;
/// <summary>
/// Memory unit size in bytes
/// </summary>
public uint mem_unit;
/// <summary>
/// Padding to 64 bytes
/// </summary>
unsafe public fixed byte _f[64];
}
}