Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
michael@0 | 1 | /* |
michael@0 | 2 | * Header file of Pure API function declarations. |
michael@0 | 3 | * |
michael@0 | 4 | * (C) Copyright IBM Corporation. 2006, 2006. All Rights Reserved. |
michael@0 | 5 | * You may recompile and redistribute these definitions as required. |
michael@0 | 6 | * |
michael@0 | 7 | * Version 1.0 |
michael@0 | 8 | */ |
michael@0 | 9 | |
michael@0 | 10 | #if defined(PURIFY) || defined(QUANTIFY) |
michael@0 | 11 | |
michael@0 | 12 | #if defined(c_plusplus) || defined(__cplusplus) |
michael@0 | 13 | extern "C" { |
michael@0 | 14 | #endif |
michael@0 | 15 | |
michael@0 | 16 | // Don't include this file directly, use purify.h instead. |
michael@0 | 17 | // If you need something that's not there, add it. |
michael@0 | 18 | #ifdef PURIFY_PRIVATE_INCLUDE |
michael@0 | 19 | |
michael@0 | 20 | #define PURE_H_VERSION 1 |
michael@0 | 21 | #include <stddef.h> |
michael@0 | 22 | |
michael@0 | 23 | ////////////////////////////// |
michael@0 | 24 | // API's Specific to Purify // |
michael@0 | 25 | ////////////////////////////// |
michael@0 | 26 | |
michael@0 | 27 | // TRUE when Purify is running. |
michael@0 | 28 | int __cdecl PurifyIsRunning(void) ; |
michael@0 | 29 | // |
michael@0 | 30 | // Print a string to the viewer. |
michael@0 | 31 | // |
michael@0 | 32 | int __cdecl PurePrintf(const char *fmt, ...) ; |
michael@0 | 33 | int __cdecl PurifyPrintf(const char *fmt, ...) ; |
michael@0 | 34 | // |
michael@0 | 35 | // Purify functions for leak and memory-in-use functionalty. |
michael@0 | 36 | // |
michael@0 | 37 | size_t __cdecl PurifyNewInuse(void) ; |
michael@0 | 38 | size_t __cdecl PurifyAllInuse(void) ; |
michael@0 | 39 | size_t __cdecl PurifyClearInuse(void) ; |
michael@0 | 40 | size_t __cdecl PurifyNewLeaks(void) ; |
michael@0 | 41 | size_t __cdecl PurifyAllLeaks(void) ; |
michael@0 | 42 | size_t __cdecl PurifyClearLeaks(void) ; |
michael@0 | 43 | // |
michael@0 | 44 | // Purify functions for handle leakage. |
michael@0 | 45 | // |
michael@0 | 46 | size_t __cdecl PurifyAllHandlesInuse(void) ; |
michael@0 | 47 | size_t __cdecl PurifyNewHandlesInuse(void) ; |
michael@0 | 48 | // |
michael@0 | 49 | // Functions that tell you about the state of memory. |
michael@0 | 50 | // |
michael@0 | 51 | size_t __cdecl PurifyDescribe(void *addr) ; |
michael@0 | 52 | size_t __cdecl PurifyWhatColors(void *addr, size_t size) ; |
michael@0 | 53 | // |
michael@0 | 54 | // Functions to test the state of memory. If the memory is not |
michael@0 | 55 | // accessable, an error is signaled just as if there were a memory |
michael@0 | 56 | // reference and the function returns false. |
michael@0 | 57 | // |
michael@0 | 58 | int __cdecl PurifyAssertIsReadable(const void *addr, size_t size) ; // size used to be an int, until IA64 came along |
michael@0 | 59 | int __cdecl PurifyAssertIsWritable(const void *addr, size_t size) ; |
michael@0 | 60 | // |
michael@0 | 61 | // Functions to test the state of memory. If the memory is not |
michael@0 | 62 | // accessable, these functions return false. No error is signaled. |
michael@0 | 63 | // |
michael@0 | 64 | int __cdecl PurifyIsReadable(const void *addr, size_t size) ; |
michael@0 | 65 | int __cdecl PurifyIsWritable(const void *addr, size_t size) ; |
michael@0 | 66 | int __cdecl PurifyIsInitialized(const void *addr, size_t size) ; |
michael@0 | 67 | // |
michael@0 | 68 | // Functions to set the state of memory. |
michael@0 | 69 | // |
michael@0 | 70 | void __cdecl PurifyMarkAsInitialized(void *addr, size_t size) ; |
michael@0 | 71 | void __cdecl PurifyMarkAsUninitialized(void *addr, size_t size) ; |
michael@0 | 72 | // |
michael@0 | 73 | // Functions to do late detection of ABWs, FMWs, IPWs. |
michael@0 | 74 | // |
michael@0 | 75 | #define PURIFY_HEAP_CRT (HANDLE) ~(__int64) 1 /* 0xfffffffe */ |
michael@0 | 76 | #define PURIFY_HEAP_ALL (HANDLE) ~(__int64) 2 /* 0xfffffffd */ |
michael@0 | 77 | #define PURIFY_HEAP_BLOCKS_LIVE 0x80000000 |
michael@0 | 78 | #define PURIFY_HEAP_BLOCKS_DEFERRED_FREE 0x40000000 |
michael@0 | 79 | #define PURIFY_HEAP_BLOCKS_ALL (PURIFY_HEAP_BLOCKS_LIVE|PURIFY_HEAP_BLOCKS_DEFERRED_FREE) |
michael@0 | 80 | int __cdecl PurifyHeapValidate(unsigned int hHeap, unsigned int dwFlags, const void *addr) ; |
michael@0 | 81 | int __cdecl PurifySetLateDetectScanCounter(int counter); |
michael@0 | 82 | int __cdecl PurifySetLateDetectScanInterval(int seconds); |
michael@0 | 83 | // |
michael@0 | 84 | // Functions to support pool allocators |
michael@0 | 85 | // |
michael@0 | 86 | void __cdecl PurifySetPoolId(const void *mem, int id); |
michael@0 | 87 | int __cdecl PurifyGetPoolId(const void *mem); |
michael@0 | 88 | void __cdecl PurifySetUserData(const void *mem, void *data); |
michael@0 | 89 | void * __cdecl PurifyGetUserData(const void *mem); |
michael@0 | 90 | void __cdecl PurifyMapPool(int id, void(*fn)()); |
michael@0 | 91 | |
michael@0 | 92 | |
michael@0 | 93 | //////////////////////////////// |
michael@0 | 94 | // API's Specific to Quantify // |
michael@0 | 95 | //////////////////////////////// |
michael@0 | 96 | |
michael@0 | 97 | // TRUE when Quantify is running. |
michael@0 | 98 | int __cdecl QuantifyIsRunning(void) ; |
michael@0 | 99 | |
michael@0 | 100 | // |
michael@0 | 101 | // Functions for controlling collection |
michael@0 | 102 | // |
michael@0 | 103 | int __cdecl QuantifyDisableRecordingData(void) ; |
michael@0 | 104 | int __cdecl QuantifyStartRecordingData(void) ; |
michael@0 | 105 | int __cdecl QuantifyStopRecordingData(void) ; |
michael@0 | 106 | int __cdecl QuantifyClearData(void) ; |
michael@0 | 107 | int __cdecl QuantifyIsRecordingData(void) ; |
michael@0 | 108 | |
michael@0 | 109 | // Add a comment to the dataset |
michael@0 | 110 | int __cdecl QuantifyAddAnnotation(char *) ; |
michael@0 | 111 | |
michael@0 | 112 | // Save the current data, creating a "checkpoint" dataset |
michael@0 | 113 | int __cdecl QuantifySaveData(void) ; |
michael@0 | 114 | |
michael@0 | 115 | // Set the name of the current thread in the viewer |
michael@0 | 116 | int __cdecl QuantifySetThreadName(char *) ; |
michael@0 | 117 | |
michael@0 | 118 | //////////////////////////////// |
michael@0 | 119 | // API's Specific to Coverage // |
michael@0 | 120 | //////////////////////////////// |
michael@0 | 121 | |
michael@0 | 122 | // TRUE when Coverage is running. |
michael@0 | 123 | int __cdecl CoverageIsRunning(void) ; |
michael@0 | 124 | // |
michael@0 | 125 | // Functions for controlling collection |
michael@0 | 126 | // |
michael@0 | 127 | int __cdecl CoverageDisableRecordingData(void) ; |
michael@0 | 128 | int __cdecl CoverageStartRecordingData(void) ; |
michael@0 | 129 | int __cdecl CoverageStopRecordingData(void) ; |
michael@0 | 130 | int __cdecl CoverageClearData(void) ; |
michael@0 | 131 | int __cdecl CoverageIsRecordingData(void) ; |
michael@0 | 132 | // Add a comment to the dataset |
michael@0 | 133 | int __cdecl CoverageAddAnnotation(char *) ; |
michael@0 | 134 | |
michael@0 | 135 | // Save the current data, creating a "checkpoint" dataset |
michael@0 | 136 | int __cdecl CoverageSaveData(void) ; |
michael@0 | 137 | |
michael@0 | 138 | |
michael@0 | 139 | #endif // PURIFY_PRIVATE_INCLUDE |
michael@0 | 140 | |
michael@0 | 141 | #if defined(c_plusplus) || defined(__cplusplus) |
michael@0 | 142 | } |
michael@0 | 143 | #endif |
michael@0 | 144 | |
michael@0 | 145 | #endif // defined(PURIFY) || defined(QUANTIFY) |