This provides easy access to the Windows API function GetProcessMemoryInfo.
OPTION is an input value in the range 1 to 9 that specifies the information value to be returned as follows:
|1: The number of page faults||(PageFaultCount)|
|2: The peak working set size, in bytes.||(PeakWorkingSetSize)|
|3: The current working set size, in bytes.||(WorkingSetSize)|
|4: The peak paged pool usage, in bytes.||(QuotaPeakPagedPoolUsage)|
|5: The current paged pool usage, in bytes.||(QuotaPagedPoolUsage)|
|6: The peak nonpaged pool usage, in bytes.||(QuotaPeakNonPagedPoolUsage)|
|7: The current nonpaged pool usage, in bytes.||(QuotaNonPagedPoolUsage)|
|8: The Commit Charge value in bytes for this process.||(PagefileUsage)|
|9: The peak value in bytes of the Commit Charge during the lifetime of this process.||(PeakPagefileUsage)|
A negative returned value indicates an error condition.
ProcessMemoryInfo@ can be called directly without the aid of a header file but it must be declared as INTEGER*8.
For further information on these information values, see "PROCESS_MEMORY_COUNTERS structure".