Skip to content

Commit

Permalink
Fix field order
Browse files Browse the repository at this point in the history
  • Loading branch information
ManlyMarco committed Mar 29, 2020
1 parent eb920e9 commit 5b75d17
Showing 1 changed file with 33 additions and 34 deletions.
67 changes: 33 additions & 34 deletions FPSCounter/MemoryInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ public static PROCESS_MEMORY_COUNTERS QueryProcessMemStatus()
private static extern IntPtr GetCurrentProcess();

[DllImport("psapi.dll", SetLastError = true)]
private static extern bool GetProcessMemoryInfo(IntPtr hProcess, [In] [Out] PROCESS_MEMORY_COUNTERS counters,
uint size);
private static extern bool GetProcessMemoryInfo(IntPtr hProcess, [In] [Out] PROCESS_MEMORY_COUNTERS counters, uint size);

/// <summary>
/// contains information about the current state of both physical and virtual memory, including extended memory
Expand All @@ -57,43 +56,43 @@ public class MEMORYSTATUSEX
public uint dwMemoryLoad;

/// <summary>
/// Size of unreserved and uncommitted memory in the extended portion of the virtual address space of the calling
/// process, in bytes.
/// </summary>
public ulong ullAvailExtendedVirtual;

/// <summary>
/// Size of available memory to commit, in bytes. The limit is ullTotalPageFile.
/// Total size of physical memory, in bytes.
/// </summary>
public ulong ullAvailPageFile;
public ulong ullTotalPhys;

/// <summary>
/// Size of physical memory available, in bytes.
/// </summary>
public ulong ullAvailPhys;

/// <summary>
/// Size of unreserved and uncommitted memory in the user mode portion of the virtual address space of the calling
/// process, in bytes.
/// </summary>
public ulong ullAvailVirtual;

/// <summary>
/// Size of the committed memory limit, in bytes. This is physical memory plus the size of the page file, minus a small
/// overhead.
/// </summary>
public ulong ullTotalPageFile;

/// <summary>
/// Total size of physical memory, in bytes.
/// Size of available memory to commit, in bytes. The limit is ullTotalPageFile.
/// </summary>
public ulong ullTotalPhys;
public ulong ullAvailPageFile;

/// <summary>
/// Total size of the user mode portion of the virtual address space of the calling process, in bytes.
/// </summary>
public ulong ullTotalVirtual;

/// <summary>
/// Size of unreserved and uncommitted memory in the user mode portion of the virtual address space of the calling
/// process, in bytes.
/// </summary>
public ulong ullAvailVirtual;

/// <summary>
/// Size of unreserved and uncommitted memory in the extended portion of the virtual address space of the calling
/// process, in bytes.
/// </summary>
public ulong ullAvailExtendedVirtual;

/// <summary>
/// Initializes a new instance of the <see cref="T:MEMORYSTATUSEX" /> class.
/// </summary>
Expand All @@ -117,25 +116,19 @@ public class PROCESS_MEMORY_COUNTERS
public uint PageFaultCount;

/// <summary>
/// The Commit Charge value in bytes for this process (SIZE_T). Commit Charge is the total amount of memory that the
/// memory manager has committed for a running process.
/// </summary>
public ulong PagefileUsage;

/// <summary>
/// The peak value in bytes of the Commit Charge during the lifetime of this process (SIZE_T).
/// The peak working set size, in bytes (SIZE_T).
/// </summary>
public ulong PeakPagefileUsage;
public ulong PeakWorkingSetSize;

/// <summary>
/// The peak working set size, in bytes (SIZE_T).
/// The current working set size, in bytes (SIZE_T).
/// </summary>
public ulong PeakWorkingSetSize;
public ulong WorkingSetSize;

/// <summary>
/// The current nonpaged pool usage, in bytes (SIZE_T).
/// The peak paged pool usage, in bytes (SIZE_T).
/// </summary>
public ulong QuotaNonPagedPoolUsage;
public ulong QuotaPeakPagedPoolUsage;

/// <summary>
/// The current paged pool usage, in bytes (SIZE_T).
Expand All @@ -148,14 +141,20 @@ public class PROCESS_MEMORY_COUNTERS
public ulong QuotaPeakNonPagedPoolUsage;

/// <summary>
/// The peak paged pool usage, in bytes (SIZE_T).
/// The current nonpaged pool usage, in bytes (SIZE_T).
/// </summary>
public ulong QuotaPeakPagedPoolUsage;
public ulong QuotaNonPagedPoolUsage;

/// <summary>
/// The current working set size, in bytes (SIZE_T).
/// The Commit Charge value in bytes for this process (SIZE_T). Commit Charge is the total amount of memory that the
/// memory manager has committed for a running process.
/// </summary>
public ulong WorkingSetSize;
public ulong PagefileUsage;

/// <summary>
/// The peak value in bytes of the Commit Charge during the lifetime of this process (SIZE_T).
/// </summary>
public ulong PeakPagefileUsage;

public PROCESS_MEMORY_COUNTERS()
{
Expand Down

0 comments on commit 5b75d17

Please sign in to comment.