1 #ifndef MEMTEST_H
2 #define MEMTEST_H
3 
4 #include <stdio.h>
5 #include <stdarg.h>
6 #include <string.h>
7 
8 // Class 2
9 typedef struct _SYSTEM_PERFORMANCE_INFORMATION
10 {
11     LARGE_INTEGER IdleProcessTime;
12     LARGE_INTEGER IoReadTransferCount;
13     LARGE_INTEGER IoWriteTransferCount;
14     LARGE_INTEGER IoOtherTransferCount;
15     ULONG IoReadOperationCount;
16     ULONG IoWriteOperationCount;
17     ULONG IoOtherOperationCount;
18     ULONG AvailablePages;
19     ULONG CommittedPages;
20     ULONG CommitLimit;
21     ULONG PeakCommitment;
22     ULONG PageFaultCount;
23     ULONG CopyOnWriteCount;
24     ULONG TransitionCount;
25     ULONG CacheTransitionCount;
26     ULONG DemandZeroCount;
27     ULONG PageReadCount;
28     ULONG PageReadIoCount;
29     ULONG CacheReadCount;
30     ULONG CacheIoCount;
31     ULONG DirtyPagesWriteCount;
32     ULONG DirtyWriteIoCount;
33     ULONG MappedPagesWriteCount;
34     ULONG MappedWriteIoCount;
35     ULONG PagedPoolPages;
36     ULONG NonPagedPoolPages;
37     ULONG PagedPoolAllocs;
38     ULONG PagedPoolFrees;
39     ULONG NonPagedPoolAllocs;
40     ULONG NonPagedPoolFrees;
41     ULONG FreeSystemPtes;
42     ULONG ResidentSystemCodePage;
43     ULONG TotalSystemDriverPages;
44     ULONG TotalSystemCodePages;
45     ULONG NonPagedPoolLookasideHits;
46     ULONG PagedPoolLookasideHits;
47     ULONG Spare3Count;
48     ULONG ResidentSystemCachePage;
49     ULONG ResidentPagedPoolPage;
50     ULONG ResidentSystemDriverPage;
51     ULONG CcFastReadNoWait;
52     ULONG CcFastReadWait;
53     ULONG CcFastReadResourceMiss;
54     ULONG CcFastReadNotPossible;
55     ULONG CcFastMdlReadNoWait;
56     ULONG CcFastMdlReadWait;
57     ULONG CcFastMdlReadResourceMiss;
58     ULONG CcFastMdlReadNotPossible;
59     ULONG CcMapDataNoWait;
60     ULONG CcMapDataWait;
61     ULONG CcMapDataNoWaitMiss;
62     ULONG CcMapDataWaitMiss;
63     ULONG CcPinMappedDataCount;
64     ULONG CcPinReadNoWait;
65     ULONG CcPinReadWait;
66     ULONG CcPinReadNoWaitMiss;
67     ULONG CcPinReadWaitMiss;
68     ULONG CcCopyReadNoWait;
69     ULONG CcCopyReadWait;
70     ULONG CcCopyReadNoWaitMiss;
71     ULONG CcCopyReadWaitMiss;
72     ULONG CcMdlReadNoWait;
73     ULONG CcMdlReadWait;
74     ULONG CcMdlReadNoWaitMiss;
75     ULONG CcMdlReadWaitMiss;
76     ULONG CcReadAheadIos;
77     ULONG CcLazyWriteIos;
78     ULONG CcLazyWritePages;
79     ULONG CcDataFlushes;
80     ULONG CcDataPages;
81     ULONG ContextSwitches;
82     ULONG FirstLevelTbFills;
83     ULONG SecondLevelTbFills;
84     ULONG SystemCalls;
85 } SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION;
86 
87 #define SystemPerformanceInformation 2
88 
89 
90 LONG
91 NTAPI
92 ZwQuerySystemInformation(
93     IN ULONG SystemInformationClass,
94     OUT PVOID SystemInformation,
95     IN ULONG Length,
96     OUT PULONG ResultLength
97 );
98 
99 
100 #endif /* MEMTEST_H */
101