|
1 /* |
|
2 * Header file of Pure API function declarations. |
|
3 * |
|
4 * Explicitly no copyright. |
|
5 * You may recompile and redistribute these definitions as required. |
|
6 * |
|
7 * Version 1.0 |
|
8 */ |
|
9 |
|
10 #if defined(c_plusplus) || defined(__cplusplus) |
|
11 extern "C" { |
|
12 #endif |
|
13 |
|
14 #define PURE_H_VERSION 1 |
|
15 |
|
16 ////////////////////////////// |
|
17 // API's Specific to Purify // |
|
18 ////////////////////////////// |
|
19 |
|
20 // TRUE when Purify is running. |
|
21 int __cdecl PurifyIsRunning(void) ; |
|
22 // |
|
23 // Print a string to the viewer. |
|
24 // |
|
25 int __cdecl PurePrintf(const char *fmt, ...) ; |
|
26 int __cdecl PurifyPrintf(const char *fmt, ...) ; |
|
27 // |
|
28 // Purify functions for leak and memory-in-use functionalty. |
|
29 // |
|
30 int __cdecl PurifyNewInuse(void) ; |
|
31 int __cdecl PurifyAllInuse(void) ; |
|
32 int __cdecl PurifyClearInuse(void) ; |
|
33 int __cdecl PurifyNewLeaks(void) ; |
|
34 int __cdecl PurifyAllLeaks(void) ; |
|
35 int __cdecl PurifyClearLeaks(void) ; |
|
36 // |
|
37 // Purify functions for handle leakage. |
|
38 // |
|
39 int __cdecl PurifyAllHandlesInuse(void) ; |
|
40 int __cdecl PurifyNewHandlesInuse(void) ; |
|
41 // |
|
42 // Functions that tell you about the state of memory. |
|
43 // |
|
44 int __cdecl PurifyDescribe(void *addr) ; |
|
45 int __cdecl PurifyWhatColors(void *addr, int size) ; |
|
46 // |
|
47 // Functions to test the state of memory. If the memory is not |
|
48 // accessible, an error is signaled just as if there were a memory |
|
49 // reference and the function returns false. |
|
50 // |
|
51 int __cdecl PurifyAssertIsReadable(const void *addr, int size) ; |
|
52 int __cdecl PurifyAssertIsWritable(const void *addr, int size) ; |
|
53 // |
|
54 // Functions to test the state of memory. If the memory is not |
|
55 // accessible, these functions return false. No error is signaled. |
|
56 // |
|
57 int __cdecl PurifyIsReadable(const void *addr, int size) ; |
|
58 int __cdecl PurifyIsWritable(const void *addr, int size) ; |
|
59 int __cdecl PurifyIsInitialized(const void *addr, int size) ; |
|
60 // |
|
61 // Functions to set the state of memory. |
|
62 // |
|
63 void __cdecl PurifyMarkAsInitialized(void *addr, int size) ; |
|
64 void __cdecl PurifyMarkAsUninitialized(void *addr, int size) ; |
|
65 // |
|
66 // Functions to do late detection of ABWs, FMWs, IPWs. |
|
67 // |
|
68 #define PURIFY_HEAP_CRT 0xfffffffe |
|
69 #define PURIFY_HEAP_ALL 0xfffffffd |
|
70 #define PURIFY_HEAP_BLOCKS_LIVE 0x80000000 |
|
71 #define PURIFY_HEAP_BLOCKS_DEFERRED_FREE 0x40000000 |
|
72 #define PURIFY_HEAP_BLOCKS_ALL (PURIFY_HEAP_BLOCKS_LIVE|PURIFY_HEAP_BLOCKS_DEFERRED_FREE) |
|
73 int __cdecl PurifyHeapValidate(unsigned int hHeap, unsigned int dwFlags, const void *addr) ; |
|
74 int __cdecl PurifySetLateDetectScanCounter(int counter); |
|
75 int __cdecl PurifySetLateDetectScanInterval(int seconds); |
|
76 |
|
77 |
|
78 //////////////////////////////// |
|
79 // API's Specific to Quantify // |
|
80 //////////////////////////////// |
|
81 |
|
82 // TRUE when Quantify is running. |
|
83 int __cdecl QuantifyIsRunning(void) ; |
|
84 |
|
85 // |
|
86 // Functions for controlling collection |
|
87 // |
|
88 int __cdecl QuantifyDisableRecordingData(void) ; |
|
89 int __cdecl QuantifyStartRecordingData(void) ; |
|
90 int __cdecl QuantifyStopRecordingData(void) ; |
|
91 int __cdecl QuantifyClearData(void) ; |
|
92 int __cdecl QuantifyIsRecordingData(void) ; |
|
93 |
|
94 // Add a comment to the dataset |
|
95 int __cdecl QuantifyAddAnnotation(char *) ; |
|
96 |
|
97 // Save the current data, creating a "checkpoint" dataset |
|
98 int __cdecl QuantifySaveData(void) ; |
|
99 |
|
100 //////////////////////////////// |
|
101 // API's Specific to Coverage // |
|
102 //////////////////////////////// |
|
103 |
|
104 // TRUE when Coverage is running. |
|
105 int __cdecl CoverageIsRunning(void) ; |
|
106 // |
|
107 // Functions for controlling collection |
|
108 // |
|
109 int __cdecl CoverageDisableRecordingData(void) ; |
|
110 int __cdecl CoverageStartRecordingData(void) ; |
|
111 int __cdecl CoverageStopRecordingData(void) ; |
|
112 int __cdecl CoverageClearData(void) ; |
|
113 int __cdecl CoverageIsRecordingData(void) ; |
|
114 // Add a comment to the dataset |
|
115 int __cdecl CoverageAddAnnotation(char *) ; |
|
116 |
|
117 // Save the current data, creating a "checkpoint" dataset |
|
118 int __cdecl CoverageSaveData(void) ; |
|
119 |
|
120 |
|
121 |
|
122 |
|
123 //////////////////////////////// |
|
124 // API's Specific to Purelock // |
|
125 //////////////////////////////// |
|
126 |
|
127 // TRUE when Purelock is running. |
|
128 int __cdecl PurelockIsRunning(void) ; |
|
129 |
|
130 |
|
131 |
|
132 |
|
133 #if defined(c_plusplus) || defined(__cplusplus) |
|
134 } |
|
135 #endif |